Can we use DBI to import data into a table?

[email protected] ("Song, Melinda")
Newsgroups perl.dbi.users
Message-ID <8A2B60CE47CDF34DA3D896C753479D0A12D0D32C37@NYWEXMBX2126.msad.ms.com>
I am using DBI to connect to a DB2 LUW database. It seems I cannot use DBI to issue the IMPORT command.

my $dbh = DBI->connect( "dbi:MSDB2:$DB_NAME", '', '', { 'RaiseError' => 1 } );
dbh->do("import from $filename of del insert into $tabname");

DBD::MSDB2::db do failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N  An unexpected token "import" was found following "BEGIN-OF-STATEMENT".  Expected tokens may include:  "<values>".  SQLSTATE=42601

Melinda Song
Morgan Stanley | Technology & Data
210 Carnegie Center | Princeton, NJ 08540
Phone: +1 609 936-4674
[email protected]<mailto:[email protected]>


--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.