perl DBI数据库连接后,怎么做export/import 请教

perl DBI数据库连接后,怎么做export/import 请教

$dbh = DBI->connect("dbiB2m_dbname","d205300","d5passwd";


大家好,我用上面的语句作了db连接之后,用下面的语句去试验可否作export/import,结果似乎跳过下面的语句。也没有报任何错误信息,table中的数据也还存在。兄弟姐妹们,多多指教!谢谢了!
$stmtad2 = "import from /dev/null of del replace into d00009.newbpcust";
$sth2  = $dbh->prepare($stmtad2);
$sth2->execute();


这个测试语句:
$dbh = DBI->connect("dbiB2m_dbname","d205300","d5passwd";
if (!defined($dbh)) {
    &writelog("ERR $0 DB connect Error.";
    goto batch_end;
}
else{
    &writelog("INF $0 DB connect Success.";
}

$stmtad1 = "select count(*) from d00009.newbpcust";
$sth1  = $dbh->prepare($stmtad1);
$sth1->execute();
$n1=$sth1->fetchrow;
&writelog("INF $0 Table newbpcust delete before count= $n1";

$stmtad2 = "import from /dev/null of del replace into d00009.newbpcust";
$sth2  = $dbh->prepare($stmtad2);
$sth2->execute();

$stmtad3 = "select count(*) from d00009.newbpcust";
$sth3  = $dbh->prepare($stmtad3);
$sth3->execute();
$n3=$sth3->fetchrow;
&writelog("INF $0 Table newbpcust delete after count= $n3";

log:
2008-08-18 12:33:21 INF /web/server_root/bin/053/jp/coby/ebpcoby_DB_rec_count.pl DB connect Success.
2008-08-18 12:33:22 INF /web/server_root/bin/053/jp/coby/ebpcoby_DB_rec_count.pl Table newbpcust delete before count= 174
2008-08-18 12:33:22 INF /web/server_root/bin/053/jp/coby/ebpcoby_DB_rec_count.pl Table newbpcust delete after count= 174
请加上 || die $dbh->errstr;
看看发生什麽事情了...
export/import是db2的命令,不是标准SQL语句,不能在DBI里执行
谢谢各位大侠!
自己写语句导出不行吗?
干嘛搞那么多笑脸啊?
因为发贴的时候没有禁用Smiles


QUOTE:
原帖由 forlorngenius 于 2008-8-24 10:34 发表
因为发贴的时候没有禁用Smiles

这样子看得头晕。