Re: Oracle 10g SQL - Parsing Delimited String
Vikram Vaidyanathan <[email protected]>
| Newsgroups | gmane.comp.db.oracle.toad.free |
|---|---|
| Message-ID | <[email protected]> |
Appreciate if you cna elaborate. The query should be dynamic. I can't specify the position of the "delimiter" since this could vary from string to string. From: "Simoneau, Roger" <[email protected]> To: "'[email protected]'" <[email protected]> Sent: Tuesday, January 10, 2012 1:50 PM Subject: RE: [toad] Oracle 10g SQL - Parsing Delimited String Substr combined with instr would do the job. Roger S. From:[email protected] [mailto:[email protected]] On Behalf Of Vikram Vaidyanathan Sent: Tuesday, January 10, 2012 2:25 PM To: [email protected] Subject: [toad] Oracle 10g SQL - Parsing Delimited String I need to write a generic SQL query to parse a comma delimited string from right to left and return the first non-null value. Example: 1. ,,,Database,,10g,,Oracle,, 2. ,,10g,,,Oracle,,,,,, 3. ,,,Data,,,Menu,,,Oracle,,, For all the above examples, the output should be "Oracle" Appreciate the help. Thanks, Vikram This communication, including any attached documentation, is intended only for the person or entity to which it is addressed, and may contain confidential, personal and/or privileged information. Any unauthorized disclosure, copying, or taking action on the contents is strictly prohibited. If you have received this message in error, please contact us immediately so we may correct our records. Please then delete or destroy the original transmission and any subsequent reply.