March 24, 2017 at 1:45 pm
Hello all,
I have files that come in everyday that needs to be bulk inserted. Some files do bulk insert fine however they are in the incorrect format. For example, an extra column may be added in the flat file (i.e. extra delimiter) and when it is bulk inserted the two columns will concatenate together.
My question is what is the best practice to check for the format of the file before I run the bulk insert?
March 24, 2017 at 3:42 pm
John215 - Friday, March 24, 2017 1:45 PMHello all,I have files that come in everyday that needs to be bulk inserted. Some files do bulk insert fine however they are in the incorrect format. For example, an extra column may be added in the flat file (i.e. extra delimiter) and when it is bulk inserted the two columns will concatenate together.
My question is what is the best practice to check for the format of the file before I run the bulk insert?
The fun way is to do a manual check whilst holding the provider in a headlock in front of a fully loaded, pre-cocked, 3 banded frozen pork chop launcher that has a foot activated trigger. 😉
Once the preparations above have been completed, import the first row (ostensibly, the header) as a full line blob and check the header against a known header string stored in the database. If they differ, stomp on the foot activated trigger. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply