SQL - Find number of
commas with a string
Oracle Database Tips by Burleson Consulting

When parsing a string variable you can use
Oracle SQL to find the number of commas by determining the length of
the string and then subtracting the non-comma text. Being able
to count delimiters in a string field is important when parsing
and extracting comma delimited files within a single database column.

This excellent SQL command paper claims to show Oracle SQL that will find the number of
commas in a string datatype variable. In this simple example of
comma counting, the capital A in the Oracle translate function show
no match, so it is bypassed:

You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts.

��

Burleson is the American Team

Note:This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.

Verify
experience!Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.

Errata? Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just e-mail:
and include the URL for the page.