Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Doctor, Pranava J dot " <Pranava dot J dot Doctor at nmb dot norwest dot com> (Pranava Doctor)
Subject: Re: BCP module
Date: Feb 16 1996 5:10PM


> > From: (Ashu Joglekar)
> >
> > 1. It would be nice to have control over the batch size (aka -b 1000 )
> That's in there.
> > 2. How about bcp out with a where clause ? I had hacked together a simple
> >     script to do this a while back (based on a script by David Neal on
> >     and we found it rather useful.
> Is that very different from writing:
>     $dbh->dbcmd("select * from table where $condition");
>     $dbh->dbsqlexec; $dbh->dbresults;
>     $, = '|';   # I want to use | as field separator...
>     while(@dat = $dbh->dbnextrow) {
>         print "@dat\n";
>     }
> I could always put that in somewhere...
> Michael
>-- End of excerpt from Michael Peppler

No. On the way out, we could do that. Its on the way in. I would read the file
in a while loop, unpack the fields into an array and then check the selection
criteria for selective BCP in.

But the philosophy of BCP is dumb copy in or out. It never was meant for
intelligent processing. (selection criteria)

I'm not saying that these premises were very good. All I'm saying is this is
how BCP has always been.

If this functionality can be added without sacrificing the speed (which is
mostly why we prefer BCP) to a great extent, it would be really nice.


Every child comes with a message that GOD has not yet given up on mankind.
						- Rabindranath Tagore.
|Pranava Doctor.			| Norwest Mortgage.		       |
|1235 11th Street, Apt. 213.		| Midas Dept. Unit # 5386.	       |
|W. Des Moines, IA 50265-2595.		| 405 SW 5th St., Des Moines,IA 50309  |
|Tel :(515)267-1107			| Tel :(515)221-4271		       |