Re: An Oracle 10g Question

From: <amerar_at_iwc.net>
Date: Sat, 26 Jan 2008 13:43:09 -0800 (PST)
Message-ID: <045a0a1c-355b-4f9e-b945-86881e73c301@q21g2000hsa.googlegroups.com>


On Jan 25, 9:46 pm, csn <csn..._at_gmail.com> wrote:
> select
>     regexp_instr('"null","null","null","GMO, DXDT, SDS, QID,
> MZZ","90", "3 ASC"',
>     '"[[:alnum:]]+, .*"',1) pos from dual;
>
> This one looks for
>
> "XXXXXXX,_......."
>
> which is exactly your description, and returns a non-zero code of 22
> which is the starting position in the string.
>
> Note: _ means space.

Is this the proper way to do this:

DECLARE
x NUMBER;

BEGIN
   x := SELECT REGEXP_INSTR

       ('"null","null","null","GMO, DXDT, SDS, QID, MZZ","90", "3 ASC"', '"[[:alnum:]]+, .*"',1) pos

       FROM DUAL;
   DBMS_OUTPUT.PUT_LINE('HERE: ' || x);
END ;
/

Or do I need to use an INTO?? Received on Sat Jan 26 2008 - 15:43:09 CST

Original text of this message