bulk insert question
I want to bulk insert a text file in to a table. say 20 columns from the flat file in to test table using format file. If the bulk insert fails then bulk insert 1 record at a time and capture rowcount in to a variable.
April 19th, 2011 8:35am

I would set up two Data Flows in SSIS: First one tries to put data into the Destination table using "Table or View Fast Load" If that data flow fails, then go on to the second, which uses "Table or View" and has an Error Flow to a Row Count transform (and optionally a Flat File Destination to capture those records that didn't make it in). Key would be to set the Precedence Constraint to "On Failure"Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 8:47am

Wonder if simply putting an event handler on the bulk insert would log the single rows fine while retaining the fast load settingTed Krueger Blog on lessthandot.com @onpnt on twitter Please click the Mark as Answer button if a post solves your problem!
April 19th, 2011 8:49am

hmm wrong posting in ssis. I need to post this in t-sql
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 8:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics