Re: How to extract single characters in PL/SQL?
From: Tim X <timx_at_spamto.devnul.com>
Date: 16 Dec 2002 15:56:54 +1100
Message-ID: <87lm2qwoh5.fsf_at_blind-bat.une.edu.au>
Date: 16 Dec 2002 15:56:54 +1100
Message-ID: <87lm2qwoh5.fsf_at_blind-bat.une.edu.au>
noergl_at_gmx.net (Ludwig Nörg) writes:
> Hi,
>
> I need to split a varchar2 field containing name and first name
> combined into 2 fields, a blank as separator.
>
> How can I do this in Oracle SQL or PL/SQL?
>
Have a look at the instr() and substr() functions. Essentially, use instr() to find where the space is and then call substr on the varchar2 string twice - once to get the bits up to the space and once to get the bit after the space.
Tim
-- Tim X. tcross (at) northnet com auReceived on Mon Dec 16 2002 - 05:56:54 CET