Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to extract indiviual substring
"C Chang" <cschang_at_maxinter.net> wrote in message
news:3B5F856F.7CDE_at_maxinter.net...
> As a newbie, I like to learn how to extract substring from a long string
> wiht some kind of sommon separator, ex "," or ";". for example I have a
> long string like - Name;123456;45.67 as an input variable, How do I
> extract the substring into an array as { Name, 1233456, 45.67} ? I have
> tried combine substr and lenght functions but no success. Can Any guru
> help me? Thanks.
>
> C Chang
You need the substr and instr functions (don't have the exact syntax of instr ready, you'll need to look that up):
substr(<string var>,1,instr(<string var>,<delimiter>))
You get the idea hopefully.
Hth,
Sybrand Bakker, Senior Oracle DBA Received on Wed Jul 25 2001 - 23:12:52 CDT