in reply to Null fields

Sounds like you are trying to prevent a null column from the CSV from being inserted into the RDBMS.

If this is the case you can check for "null" after the fetch and before the insert via:

if ( $six eq '' ) { # don't insert } else { # ok to insert } # or perhaps if ( length($six) == 0 ) { # don't insert } else { # ok to insert }

Another option (possibly not available from the CVS)

INSERT INTO Customer_Information (CustomerNumber, Name, Address1, Address2, City, State, ZipCode, Email, DefaultPassword) VALUES ( SELECT one, two, three, four, six, seven, eight, nine , sixteen FROM info WHERE six is not null )

Replies are listed 'Best First'.
Re: Re: Null fields
by quietone (Initiate) on Mar 27, 2001 at 23:22 UTC
    Actually, what is happening is that when it read a null column, it skips the record. I need to write all the records, even if it has null columns in it, to the database.