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

Home -> Community -> Usenet -> c.d.o.server -> Re: instr question

Re: instr question

From: <chris.hulan_at_gmail.com>
Date: 20 Jul 2006 12:15:48 -0700
Message-ID: <1153422947.980239.77710@m79g2000cwm.googlegroups.com>

kimberly.shaffer_at_gmail.com wrote:
> Thank you Brian,
>
> When I sort of plug in my current field and current table just to see
> what results I get, I get the following error
>
> SELECT SUBSTR(so_act_arg,INSTR(so_act_arg),' ')+1,
> INSTR(so_act_arg,' ',1,2) - NSTR(so_act_arg),' ')-1)
> FROM appworx.so_object_cond
> WHERE so_act_arg LIKE '-m%';
>
> FROM keyword not found where expected. What am I doing wrong?

a tool that does SQL auto-formating (like TOAD) is usefull for this type of stuff.

Try:
SELECT SUBSTR (so_act_arg

              , INSTR (so_act_arg, ' ') + 1
              , INSTR (so_act_arg, ' ', 1, 2) - INSTR (so_act_arg, ' ')
- 1
              )

  FROM appworx.so_object_cond
 WHERE so_act_arg LIKE '-m%'; Received on Thu Jul 20 2006 - 14:15:48 CDT

Original text of this message

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