NOT NULL Constraint Ignored During BULK INSERT

  • http://msdn.microsoft.com/en-us/library/ms188365.aspx

    CHECK_CONSTRAINTS

    Specifies that all constraints on the target table or view must be checked during the bulk-import operation. Without the CHECK_CONSTRAINTS option, any CHECK and FOREIGN KEY constraints are ignored, and after the operation, the constraint on the table is marked as not-trusted.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Crispin, thanks. As indicated in my original post, I am using CHECK_CONSTRAINTS. Am I using CHECK_CONSTRAINTS incorrectly, or does CHECK_CONSTRAINTS ignore the NOT NULL constraint? In my case, no error is generated. NULLs are replaced with empty strings. I do not have this problem with INSERT INTO, which is rejecting NULLs on columns where the NOT NULL constraint is specified.

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply