|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: BCP modules.
Date: Dec 22 1998 5:59PM
>>>>> "Yuri" == Khait, Yuri writes:
Yuri> I'm writing SYBPERL script where I need to bcp in data into the
Yuri> database. I only know the HostFile, the Table name , the
Yuri> database name and the column delimiters which is "|". I was
Yuri> thinking to of using BCP routines from SYBPERL, but in this case
Yuri> I would need to figure out how many columns each table has,
Yuri> probably use bcp_colfmt to describe every column in order to
Yuri> change the defaults like delimiters and so on. My question is -
Yuri> would it better just to build bcp string like $bcp_str="bcp
Yuri> database..table in hostfile -c -t........" and then just execute
Yuri> system command like system($bcp_str); ???
Using the BCP routine in sybperl gives you some interesting options
(you should also check out the SYbase::BCP module), but unfortunately
these routines are a little slow.
Executing the bcp command using system() is often a very good way to
go, and is usually a lot faster.
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|