Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

bcp aborts on first FK violation

$
0
0
I want to use BCP to load data from a text file.By default, constraints are turned off in bcp, so I use the [i][b]CHECK_CONSTRAINTS[/b][/i] hint.bcp aborts if ANY of the rows contains a FK violation. No data get loaded.So if I add the [i][b]-b 1[/b][/i] batch size option, it loads all data UNTIL the first FK violation, but nothing after that.I want to load EVERYTHING ... except for the violations. But bcp won't let me. [b]Is there a way?[/b]

Viewing all articles
Browse latest Browse all 6525

Trending Articles