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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number of Occurences in a String 1

Status
Not open for further replies.

mwake

Programmer
Feb 12, 2004
151
US
I'm using CR 2008 and Oracle 10G as a database. I have a Selected Countries field that is a string that contains multiple country id's separated by commas (ex. 12, 125, 187, 94). I need to create a formula which gives me the total number of countries in the string. Given the 12, 125, 187, 94 example, the formula would return the number 4. How do I do it??
 

Give this a try:

whileprintingrecords;
stringvar array v_countries := split({yourfield},",");
ubound(v_countries)

 
Thanks Brian. That did the trick!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top