Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> select separate values in a string: sql

select separate values in a string: sql

From: Alex Doster <xander_at_dwiz.net>
Date: 19 Nov 2002 13:10:28 -0800
Message-ID: <ae94f027.0211191310.928a1da@posting.google.com>


Pardon me if this is the wrong group to ask this question to.

I have a character field that contains address information (don't ask why I didn't seperate it)
and I need to use pl/sql to grab individual parts of the string.

Example - Field C_Address contains

"1234 W. Value Street Denver, CO 99508"

The query should return

STREET     1234 W. Value Street
CITY       Denver
STATE      Colorado

ZIPCODE 99508 The only thing I can think of to get the zipcode is to use the right() function.
SELECT RIGHT("C_ADDRESS", 5) AS ZIPCODE
But am not sure if this will even work.
Other than that, I'm stumped.

Thanks for help
Lex Received on Tue Nov 19 2002 - 15:10:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US