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: Can someone with access to 8ir3 test this for me please?

Re: Can someone with access to 8ir3 test this for me please?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 19 Feb 2004 20:17:58 +0000 (UTC)
Message-ID: <c135lm$i8i$1@hercules.btinternet.com>

Why would you expect this to work ?
I don't think any DDL statements can
use bind variables. Are you questioning
the fact that it fails, or that it doesn't give an appropriate error message ?

Here's another example that won't work,
and isn't expected to:

declare

    my_int pls_integer;

    my_str varchar2(2000);

begin

    my_str:= 'create table t1 ( n1 number(:xx))';

    my_int:= 10;

    execute immediate my_str using my_int;

end;

-- 
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

  The educated person is not the person
  who can answer the questions, but the
  person who can question the answers -- T. Schick Jr


Next public appearances:
 March 2004 Hotsos Symposium - The Burden of Proof
 March 2004 Charlotte NC OUG - CBO Tutorial
 April 2004 Iceland


One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html


Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK___February
____UK___June


The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


"Noons" <wizofoz2k_at_yahoo.com.au> wrote in message
news:73e20c6c.0402190308.16e9171e_at_posting.google.com...

> Here is what clunks in 9ir2, reduced form:
>
> SQL> select * from user_sequences;
> Press Return to continue...
>
> SEQUENCE_NAME MIN_VALUE MAX_VALUE INCREMENT_BY C O
CACHE_SIZE
> LAST_NUMBER
> ------------------------------ ---------- ---------- ------------ - - ----
------
> -----------
> MY_SEQ 1 1.0000E+27 1 N N
20
> 1
>
> Elapsed: 00:00:00.05
> SQL> set echo on
> SQL> start zot
> SQL> declare
> 2 my_int pls_integer;
> 3 my_str varchar2(2000);
> 4 begin
> 5 my_str:= 'alter sequence my_seq minvalue :moah';
> 6 my_int:= 10;
> 7 execute immediate my_str using my_int;
> 8 end;
> 9 /
> declare
> *
> ERROR at line 1:
> ORA-01722: invalid number
> ORA-06512: at line 7
>
>
> Elapsed: 00:00:00.00
> SQL>
>
> I need to know if this also happened in 8ir3?
> Many TIA for any help.
> Cheers
> Nuno Souto
> wizofoz2k_at_yahoo.com.au.nospam
Received on Thu Feb 19 2004 - 14:17:58 CST

Original text of this message

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