quietone has asked for the wisdom of the Perl Monks concerning the following question:
$dbh = DBI->connect(qq{DBI:CSV:csv_sep_char=\\,}); $dbh->{'csv_tables'}->{'info'} = { 'file' => 'cust_sum_da.csv'}; $sth = $dbh->prepare("SELECT * FROM info"); $sth->execute(); my($one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten +, $eleven, $twelve, $thirteen, $fourteen, $fifteen, $sixteen); $sth->bind_columns(undef, \$one, \$two, \$three, \$four, \$five, \$six +, \$seven, \$eight, \$nine, \$ten, \$eleven, \$twelve, \$thirteen, \$ +fourteen, \$fifteen, \$sixteen); while ($sth->fetch) { $SqlStatement4 = ("INSERT INTO Customer_Information " . "(CustomerNumber, Name, Address1, Address2, City, State, ZipCode, Em +ail, DefaultPassword) " . "VALUES ('$one', '$two', '$three', '$four', '$six', '$seven', '$eight' +, '$nine', '$sixteen') "); $db->Sql($SqlStatement4); } $db->Close(); $sth->finish(); # print $SqlStatement; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Null fields
by busunsl (Vicar) on Mar 27, 2001 at 19:46 UTC | |
by Tyke (Pilgrim) on Mar 27, 2001 at 19:59 UTC | |
by arturo (Vicar) on Mar 27, 2001 at 20:09 UTC | |
by Tyke (Pilgrim) on Mar 27, 2001 at 20:16 UTC | |
by merlyn (Sage) on Mar 27, 2001 at 21:25 UTC | |
| |
by busunsl (Vicar) on Mar 27, 2001 at 21:37 UTC | |
| |
by busunsl (Vicar) on Mar 27, 2001 at 21:25 UTC | |
|
Re: Null fields
by wardk (Deacon) on Mar 27, 2001 at 20:22 UTC | |
by quietone (Initiate) on Mar 27, 2001 at 23:22 UTC | |
|
Re: Null fields
by arturo (Vicar) on Mar 27, 2001 at 19:58 UTC |