> Is placeholders not allowed in DDL statements or what?
Looking at this, I'd say no. Note the describe is skipped, so I'd say
the statement isn't really parsed by Oracle until the execute is
called.
dbd_preparse scanned 1 distinct placeholders
OCIHandleAlloc(0x81c2d18,0x81e94d4,4,0,(nil))=SUCCESS
OCIStmtPrepare(0x81e47b0,0x81d1fbc,'create table yaya as select * from one where me =
:p1 ',54,1,0)=SUCCESS
OCIAttrGet(0x81e47b0,4,0x81e94d8,(nil),24,0x81d1fbc)=SUCCESS
dbd_st_prepare'd sql CREATE
dbd_describe skipped for CREATE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<- prepare= DBI::st=HASH(0x814b080) at mytest.pl line 18.
-> execute for DBD::Oracle::st (DBI::st=HASH(0x814b080)~0x8176408 'yuck')
bind :p1 <== 'yuck' (type 0)
bind :p1 <== 'yuck' (size 4/5/0, ptype 4, otype 1)
bind :p1 <== 'yuck' (size 4/4, otype 1, indp 0)
OCIBindByName(0x81e47b0,0x81e9284,0x81d1fbc,":p1",3,0x81e9540,4,1,0x81e9296,(nil),0x81e9294,0,(nil),2)=ERROR
OCIErrorGet(0x81d1fbc,1,"<NULL>",0xbffff1d8,"ORA-01036: illegal variable name/number
",1024,2)=SUCCESS
OCIErrorGet after OCIBindByName (er1:ok): -1, 1036: ORA-01036: illegal variable
name/number
OCIErrorGet(0x81d1fbc,2,"<NULL>",0xbffff1d8,"ORA-01036: illegal variable name/number
",1024,2)=NO_DATA
ERROR EVENT 1036 'ORA-01036: illegal variable name/number (DBD ERROR:
OCIBindByName)' on DBI::st=HASH(0x8176408)
On Wed, Feb 07, 2001 at 03:14:57PM +0100, Lars Eskildsen wrote:
> I am trying to construct an DBI SQL statement like:
> $my_stmt = $my_dbcon->prepare("CREATE TABLE BLABLABLA AS (SELECT * FROM
>ANOTHER_TABLE WHERE ID = ?)");
> <Calculate $ID>
> $my_stmt->execute($ID);
>
> DBD::Oracle::st execute failed: ORA-01036: illegal variable name/number (DBD ERR
> OR: OCIBindByName) at .....
> Is placeholders not allowed in DDL statements or what?
tom
--
Thomas A. Lowery [EMAIL PROTECTED]
http://tlowery.hypermart.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com