I am importing a CSV file to a DB table using DTS.(SQL 2000) The destination table has defaults set for all NOT NULL fields.
Eg
Create Table TableName
(
field1 ... ,
field2 ... ,
CustomerExists bit NOT NULL DEFAULT 0
)
I find that when a NULL is encountered in the import file, rather than the default being used in its place, the import fails with a Constraint violation error.
Why does this happen? If I insert records one by one using INSERT INTO the default is used, no probs.
Yael
Eg
Create Table TableName
(
field1 ... ,
field2 ... ,
CustomerExists bit NOT NULL DEFAULT 0
)
I find that when a NULL is encountered in the import file, rather than the default being used in its place, the import fails with a Constraint violation error.
Why does this happen? If I insert records one by one using INSERT INTO the default is used, no probs.
Yael