Home » Developer & Programmer » Forms » count ',' in a string
count ',' in a string [message #79780] Thu, 11 July 2002 12:18 Go to next message
Tyler
Messages: 123
Registered: January 2002
Senior Member
Ok, I have a string variable. I want to count the number of ',' (comma's) in the string... how can I do this? I've tried count(instr(v_string,',')), but instr gives a number position of the comma', not how many there are...

Suggestions?

T
Re: count ',' in a string [message #79782 is a reply to message #79780] Thu, 11 July 2002 21:17 Go to previous message
Ravi
Messages: 251
Registered: June 1998
Senior Member
Use This

v_count := length(v_string)-length(replace(v_string,',');

Let me know if this solves your problem
Previous Topic: Data validation - Urgent ...
Next Topic: Re: Conversion from Forms 2.3 to Forms 6
Goto Forum:
  


Current Time: Thu Mar 28 04:58:03 CDT 2024