Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count the no of commas in a field

Status
Not open for further replies.

Rahel

Programmer
Feb 16, 2000
30
GB

If I had a table for example called Authors

which has a field called Topics

<Art,Science,Astronomy,Geology>

How can I count all the commas and remember their positions?

I want to extract individual topics and then append them to another table.

I dont know how to look for commas in a string

Can anyone point me in the right direction



[sig][/sig]
 
You'll probably need to use CharIndex(), and use the optional starting position parameter for the second and subsequent calls.
[sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top