RE: NULL field matching problem...

2005-03-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > I'm used to Oracle, which treats an empty string as NULL. > Is it different for MySQL? Yes, it is different for many other RDBMSs. Oracle has it dead wrong here, and many people consider it a bug, or at the least, a rather serious gotcha. - -- Gr

RE: NULL field matching problem...

2005-03-16 Thread Ian Harisay
March 16, 2005 10:54 AM To: NIPP, SCOTT V (SBCSI); Ronald J Kimball; dbi-users@perl.org Subject: RE: NULL field matching problem... I'm guessing that when a field is empty in your CSV file, then the method $csv->fields puts an empty string value (e.g. "") in the corresponding

RE: NULL field matching problem...

2005-03-16 Thread Ronald J Kimball
CAMPBELL, BRIAN D (BRIAN) [mailto:[EMAIL PROTECTED] wrote: > I'm guessing that when a field is empty in your CSV file, then the method > $csv->fields puts an empty string value (e.g. "") in the corresponding > element in your @data array (not an undef value). > > If so, you are going to have to d

RE: NULL field matching problem...

2005-03-16 Thread CAMPBELL, BRIAN D (BRIAN)
; Ronald J Kimball; dbi-users@perl.org Subject: RE: NULL field matching problem... That sounds good, but I am a little confused on exactly how to achieve that. I'll start poking around, but... Thanks for the pointer at least. Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTEC

RE: NULL field matching problem...

2005-03-16 Thread NIPP, SCOTT V \(SBCSI\)
BRIAN D (BRIAN) [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 10:54 AM To: NIPP, SCOTT V (SBCSI); Ronald J Kimball; dbi-users@perl.org Subject: RE: NULL field matching problem... I'm guessing that when a field is empty in your CSV file, then the method $csv->fields puts an

RE: NULL field matching problem...

2005-03-16 Thread CAMPBELL, BRIAN D (BRIAN)
IL PROTECTED] Sent: Wednesday, March 16, 2005 9:18 AM To: Ronald J Kimball; dbi-users@perl.org Subject: RE: NULL field matching problem... I thought about that after I hit the send button. Here is the INSERT code... my $sth = $dbh->prepare("INSERT INTO AllMid_Data VALUES(?".

RE: NULL field matching problem...

2005-03-16 Thread Ronald J Kimball
NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] wrote: > > I thought about that after I hit the send button. Here is the > INSERT code... > > my $sth = $dbh->prepare("INSERT INTO AllMid_Data VALUES(?".(",?" x > 21).")") > or print "Error with INSERT _prepare_ $DBI::errstr\n"; > my

RE: NULL field matching problem...

2005-03-16 Thread NIPP, SCOTT V \(SBCSI\)
PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -Original Message- From: Ronald J Kimball [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 10:14 AM To: NIPP, SCOTT V (SBCSI); dbi-users@perl.org Subject: RE: NULL field matching problem... NIPP, SCOTT V (SBCSI) [mailto:[EMAIL P

RE: NULL field matching problem...

2005-03-16 Thread Ronald J Kimball
NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] wrote: > I am working on a script that parses a csv file. The actual > field delimiters in the file are pipes |. The problem I am running into > is that if the field is empty, then the database is getting a '0' rather > than 'NULL' as it s