Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Maybe an odd question: Comma's and character sets

2776946Apr 4 2015 — edited Apr 5 2015

Now what I want to know is: are comma's considered part of a character string, or do they implicitly cause an end of the string break like a space would.

Odd question I just want to know.

You can read the query and output to maybe get an understanding of why I'm asking this, although it may just be a waste of your time. A simple yes/no would suffice as an answer to my question as it is all I need to know.

so i'm first starting off with a query:

SELECT ADDRESS2,

REGEXP_REPLACE(ADDRESS2,

'(^[[:alpha:] ]+), ([[:alpha:]]{2}) ([[:digit:]]{5})',

'\3 \2 \1') THE_STRING

FROM ORDER_ADDRESSES

WHERE ROWNUM <= 5;

notice the comma

giving me output:

ADDRESS2                THE_STRING

---------------------------------------- ------------------------

Tulsa, OK 74103                          74103 OK Tulsa

Bugscuffle, TN 37183                   37183 TN Bugscuffle

Issaquah, WA 98027                    98027 WA Issaquah

Santa Barbara, CA 93109            93109 CA Santa Barbara

Havre De Grace, MD 21078         21078 MD Havre De Grace

Now what I want to know is: are comma's considered part of a character string, or do they implicitly cause an end of the string break like a space would.

Odd question I just want to know.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2015
Added on Apr 4 2015
3 comments
818 views