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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Anyone have a fresh pair of eyes....?

Re: Anyone have a fresh pair of eyes....?

From: Edgar Chupit <chupit_at_gmail.com>
Date: Tue, 26 Jun 2007 06:31:31 +0200
Message-ID: <a8f0771c0706252131u64e56a1dud9e3c65ad4e60a6f@mail.gmail.com>


Good morning,

I think this is because bind variables can be used only for DML statements and alter is not exactly DML statement. The only other option is to directly concatenate seq_diff value to sql_statement.

Simple testcase:

TDS2_at_GALA $drop sequence test_sq;

Sequence dropped.

TDS2_at_GALA $create sequence test_sq;

Sequence created.

TDS2_at_GALA $begin
  2 execute immediate 'alter sequence test_sq increment by :x' using 1;   3 end;
  4 /
begin
*
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at line 2

On 6/26/07, Bobak, Mark <Mark.Bobak_at_il.proquest.com> wrote:
>
> This has got to be something stupid, but I'm just not seeing it, and I'd
> like to go home at some point this evening....;-)
>
> ---> execute immediate sql_statement using seq_diff;
> I think I've been staring for too long...can someone throw me a rope
> here?? ;-)
>
> Thanks!
>
> -Mark
>
> *--
> Mark J. Bobak*
> *Senior Database Administrator, System & Product Technologies*
> ProQuest
> 789 E. Eisenhower, Parkway, P.O. Box 1346
> Ann Arbor MI 48106-1346
> 734.997.4059 or 800.521.0600 x 4059
> *mark.bobak**@il.proquest.com* <mark.bobak_at_il.proquest.com>
> *www.proquest.com* <http://www.proquest.com/>
> *www.csa.com* <http://www.csa.com/>
>
> *ProQuest...*Start here.
>
>
>

-- 
Best regards,
Edgar Chupit
callto://edgar.chupit

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jun 25 2007 - 23:31:31 CDT

Original text of this message

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