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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to extract indiviual substring

Re: How to extract indiviual substring

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 26 Jul 2001 06:12:52 +0200
Message-ID: <996120773.28553.0.pluto.d4ee154e@news.demon.nl>

"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

Original text of this message

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