bubnoff has asked for the wisdom of the Perl Monks concerning the following question:
Problem: I'm using Sybase::BCP to import data and seeing nothing but NULL in the target table. Here's the code:
Sample data:$bcp = new Sybase::BCP $user, $passwd, $server; $bcp->config(INPUT => 'testStud2.bcp', OUTPUT => 'tempdb..agStudDB', FIELDS => 6, SEPARATOR => '|', ERRORS => 'BCP.err'); $bcp->run;
"AARDVARK, GLOIN"|04|1770 FAKE ADDRESS|(509) 666-6666|0888888|114 "AARDVARK, CHOMPERS"|06|1770 FAKE ADDRESS|(509) 665-6666|0999999|212
Using standard BCP puts my friends the Aardvarks in the table, but using Sybase::BCP inside Perl gives me the following:
So it looks like it's getting there, just not as expected. Any ideas ( preferably not involving standard bcp )?1> select * from tempdb..agStudDB 2> go name + grade address + prime_phone altid ent --------------------------------------------------------------------- +----------- ------ -------------------------------------------------------------- +------------------ -------------------- -------------------- ------ NULL + NULL NULL + NULL NULL NULL NULL + NULL NULL + NULL NULL NULL (2 rows affected)
Just tried this with Sybase::BLK and got:
This version of Sybase::CTlib doesn't support the CS_SERVERADDR property at /usr/local/lib/perl/5.8.8/Sybase/BLK.pm line 363
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Sybase::BCP ~ getting NULL values
by roboticus (Chancellor) on Nov 13, 2009 at 15:15 UTC | |
by bubnoff (Novice) on Dec 18, 2009 at 18:33 UTC | |
|
Re: Using Sybase::BCP ~ getting NULL values
by runrig (Abbot) on May 06, 2016 at 20:53 UTC |