Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: I want to know how many times comma(,) appear in string ...
On Mon, 27 Sep 1999, ÃÖ»ó¼ø wrote:
> I want to know the count of the string or character
>
> as follows .
>
> Given,
> ls_string = '1253,5678,ascd,!@#er, 5896, @@@;';
>
>
> How many times appear comma(,) in the string 'ls_string' ?
>
> The result : The comma(,) appears five times in the 'ls_string' .
>
> Is there any function or other way to resolve this problem ?
>
> We use Oracle 7.3.3.3.
>
> Thanks in Advance .
>
Just try this:
select length(ls_string) - length(replace(ls_string,',')) from ???
tomhag_at_rsv.se Received on Tue Sep 28 1999 - 09:34:36 CDT
![]() |
![]() |