in reply to Using Sybase::BCP ~ getting NULL values

bubnoff:

I've never used Sybase::BCP, but I've used bcp from the command line before, and I'd suspect that the configuration needs a bit more information. Somehow, it has to map the columns in the input file to the columns in the table. So try using the REORDER parameter to map them, something like:

$bcp->config( ... REORDER => { 1=>'name', 2=>'grade', 3=>'address', 4=>'prime_phone +', 4=>'prime_phone', 5=>'altid', 6=>'ent' }, ...);
...roboticus

Replies are listed 'Best First'.
Re^2: Using Sybase::BCP ~ getting NULL values
by bubnoff (Novice) on Dec 18, 2009 at 18:33 UTC

    Thanks for the reply Roboticus!

    I haven't had time to test your suggestion yet but hope to get a chance soon. I have a feeling though, that the original BCP is incompatible with newer versions of Sybase. Also, the BLK package doesn't seem to work on my machines due to a library conflict or similar. I may just stick with regular BCP or use Python's implementation which sits on top of the ASE libraries.

    I believe Peppler has switched to MS SQL Server and has stopped all the great work he was doing for the Sybase/PERL community. Such is life.



    Thanks again,

    Bub