|
|
sybperl-l Archive
Up Prev Next
From: "Scott Zetlan" <scottzetlan at aol dot com>
Subject: RE: Sybase BCP
Date: Feb 28 2002 1:55PM
Yes, still true, and yes, you can always call the Sybase bcp utility. But
then you wouldn't be able:
-- to reorder the columns based on a column heading record;
-- to install your own callback function to eliminate records you don't
want or modify those you do;
-- to use a regular expression as a field separator;
-- nor to identify the individual rows that don't transfer properly instead
of failing an entire batch.
If you don't need to do any of that, just call the Sybase utility -- but
don't use system(); open a pipe instead:
open (BCP, "bcp... |");
That way, you can capture the output and determine how many rows were
loaded. With system, you only get a return code.
Scott
-----Original Message-----
From: owner-SYBPERL-L@list.cren.net
[mailto:owner-SYBPERL-L@list.cren.net]On Behalf Of Ho, Tony
Sent: Thursday, February 28, 2002 8:33 AM
To: SybPerl Discussion List
Subject: Sybase BCP
Hi guys
I came across the following URL regarding Sybase BCP for Perl.
It mentions The current implementation seems to run about 2.5 to 3 times
slower than plain bcp
Is that still true ?
So, I guess it would be better to call the UNIX BCP command by setting in
my perl code:
system("bcp....");
Cheers
Tony
|