If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I want to get the function to count the number of occurance of a particular character in a string.
Ex. In the string 'xx, yy, zz', I want to get the number of ','s(Commas).
Actually, a particular character could be more than 1 byte long in a Unicode database, while LENGTH() returns the number of bytes, so I would use Tonkuma's suggestion to be on the safe side.
Actually, a particular character could be more than 1 byte long in a Unicode database, while LENGTH() returns the number of bytes, so I would use Tonkuma's suggestion to be on the safe side.
we are looking for occurances,
so good point and accurate.
being from an ebcdic only, mainframe environment, I forget that there are other worlds out there.
__________________
Dick Brenholtz, Ami in Deutschland