|
|
sybperl-l Archive
Up Prev Next
From: "Lin, Arthur" <arthur at lehman dot com>
Subject: Switch SEPARATOR between different BCP runs
Date: Oct 30 2003 7:33PM
For the first BCP run I set
Use Sybase::BLK;
$BCP->config(DIRECTION => IN,
INPUT => "$FID_REPO_FILE_BCP",
OUTPUT => "$Database..$dl_table",
ERRORS => "$dl_table.err",
SEPARATOR=> '\|',
FIELDS => 27,
BATCH_SIZE => 1000);
$RowCount = $BCP->run;
And it works.
For the second BCP run I set
$GP_BLK->config(
INPUT => "$ListFile",
OUTPUT => "$ListTable",
ERRORS => "$ListFile.err",
FIELDS => 3,
BATCH_SIZE => 6000,
SEPARATOR => '\t');
die "\tBCP in $ListTable failed\n" unless ( $GP_BLK->run ==
$RowCount );
unlink $ListFile, "$ListFile.err";
But it fails because it does not take '\t' as a separator.
Am I doing something wrong here to reset the separator ?
Thanks in advance for your assistance.
Regards,
Arthur
------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the
designated recipient(s) named above. If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited. This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers. Email transmission cannot be guaranteed to be
secure or error-free. Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such. All
information is subject to change without notice.
|