Question

I'm having great difficulty using OPENROWSET BULK

Basically, if it tries to insert a NULL into a NOT NULL column, it throws a run time error. If it tries to insert a non-number into an 'int' it throw a run time error. If I put a varchar(20) into a varchar(10) it throw a run time error. this list goes on....

I have specified an ERRORFILE, so why is it not putting the rows into the Error File?

If this is normal behaviour, then what does go in the error file?

Was it helpful?

Solution

The ERRORFILE is for rows that cannot be read from the data file. All the errors you quote are errors from failure to insert a successfully read row into the destination table. There is no way to circumvent those errors, you must import correct data into correct tables. Seems that what you want is more likely a fully fledged SSIS pipeline.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top