Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select separate values in a string: sql
Look at the docs for the use of the substr and instr functions in SqlPlus... They will do what you need...
hth,
xander_at_dwiz.net (Alex Doster) wrote:
>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:34:12 CST
![]() |
![]() |