PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Jeff Buchmiller <jlb at spo dot eds dot com>
Subject: Re: error bcp-ing into a column which does not allow nulls
Date: Feb 19 1999 10:33PM

> Sybase error: Attempt to bulk-copy a NULL value into Server column 1, which
> does not accept NULL values.
> any ideas on how this was resolved. We are getting the same error here.
> thanks
> dinyar

It is likely that the first column in the table actually does not accept
NULL values.  Verify that, as someone already pointed out.  Then, does
the line in the bcp file start with a tab?  Or, is there a line with
white space only?  The other columns may accept NULL's, while the first
does not.  Be careful, because you probably still need a newline
character at the end of the last line in the file.  To narrow down where
the problem occurs, try bcp'ing smaller files, each with a portion of
the original bcp file, and keep dividing until the offending line is
found (or use the "1 row affected" output statements to deduce it).