Link to home
Start Free TrialLog in
Avatar of atclark
atclark

asked on

bcp is not following the check constraint

Hi,

I have a check constraint on several columns of integers.  When I use bcp, even when the values being imported are outside the specified domain, bcp imports them in just fine.
When I use an insert statement manually, the constraints are enforced, so I don't think it's my syntax.

How can I get bcp to follow the check constraints and not go outside my desired domain?

A part of my create table statement:
num_5000   INTEGER   NOT NULL
    CHECK (num_5000 BETWEEN 0 and 708),

The bcp command for a tab delimited ASCII text file:
bcp chiptray..core_data in temp.txt /SSERVER /Usa /Pxxx /c

And finally, bcp is called from within a batch file.

Thanks.  :-)
ASKER CERTIFIED SOLUTION
Avatar of gmoriak
gmoriak

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of atclark
atclark

ASKER

Thank you.  That's exactly the information I needed.