Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Anyone have a fresh pair of eyes....?
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-lReceived on Mon Jun 25 2007 - 23:31:31 CDT
![]() |
![]() |