我想運行這是擺在1.SQL文件時,此命令是我的代碼:perl DBI支持這樣的@file_name命令嗎?
$sth=$dbh->do(q { @1.sql });
但這種代碼是不工作:
有輸出:
DBI::db=HASH(0xf18edc0) trace level set to 0x0/2 (DBI @ 0x0/0) in DBI 1.634-ithread (pid 10389)
-> do in DBD::_::db for DBD::Oracle::db (DBI::db=HASH(0xf18ee50)~0xf18edc0 ' @1.sql ') thr#eebf010
dbd_st_execute (STMT TYPE 0) (out0, lob0)...
Statement Execute Mode is 32 (COMMIT_ON_SUCCESS)
-> DESTROY for DBD::Oracle::st (DBI::st=HASH(0xf18f190)~INNER) thr#eebf010
ERROR: 900 'ORA-00900: invalid SQL statement (DBD ERROR: error possibly near <*> indicator at char 1 in ' <*>@1.sql ')' (err#1)
<- DESTROY= undef at run.pl line 12
!! ERROR: 900 'ORA-00900: invalid SQL statement (DBD ERROR: error possibly near <*> indicator at char 1 in ' <*>@1.sql ')' (err#0)
<- do= undef at run.pl line 12
DBD::Oracle::db do failed: ORA-00900: invalid SQL statement (DBD ERROR: error possibly near <*> indicator at char 1 in ' <*>@1.sql ') [for Statement " @1.sql "] at run.pl line 12.
DBD::Oracle::db do failed: ORA-00900: invalid SQL statement (DBD ERROR: error possibly near <*> indicator at char 1 in ' <*>@1.sql ') [for Statement " @1.sql "] at run.pl line 12.
! -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0xf18edc0)~INNER) thr#eebf010
ERROR: 900 'ORA-00900: invalid SQL statement (DBD ERROR: error possibly near <*> indicator at char 1 in ' <*>@1.sql ')' (err#0)
! <- DESTROY= undef during global destruction