Hmmm.... I see that the "export" command is in the "Command Reference"
manual and not in "SQL Reference" Manual, so looks like it might not be
valid sql.

Although "export" ( like "import" ) in DB2 is called from within DB2
prompt, not directly on the command line.

Thanks a lot for the info.

Sumitro.

On Thu, 2004-01-15 at 07:33, Gold, Samuel (Contractor) wrote:
> I know nothing about DB2, is export a sql statement or a  utility that you
> run from the command line?  If it is a utility that you run from the command
> line then it would make since that it would not work from DBD.  Just like
> with Oracles' export utility, exp, I could not call that from SQL*Plus.  It
> is not a valid sql statement.  You use system call instead or backticks.
> HTH
> 
> Thanks,
> Sam Gold
> 
> -----Original Message-----
> From: Sumitro Chowdhury [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 14, 2004 4:58 PM
> To: dbi-users
> Subject: is export/import statements not allowed inside prepare/do ?
> 
> 
> Hi,
> 
> Googling did not get me anywhere so hoping for some pointers here.
> 
> Using DBD::DB2, this do/prepare fails during execute:
> 
> my $sth = $dbh->prepare(qq{export to product.exp of del messages 
> product.mes select * from product.product where pr_upc = ?}) || die
> "Couldn't prepare statement".$dbh->errstr;
> 
> Error message:
> DBD::DB2::st execute failed: [IBM][CLI Driver][DB2/6000] SQL0104N  An
> unexpected token "product" was found following "export to ".  Expected
> tokens may include:  "JOIN".  SQLSTATE=42601
> 

> 
> 

Reply via email to