Thursday, March 8, 2012

BULK INSERT FIELD TERMINATOR

I need to be able to insert data from a file that may be tab delimited or delimited with spaces. Right now I am using fieldterminator = '\t' but I also need to account if there are just spaces there. Can this be done?any bites?|||

I don't believe that you will be able to use multiple terminitors.

The way that I have dealth with issues like this is to create a 'data washing' step prior to the bulk load. If you are using a JOB, DTS, or SSIS, create a step that runs a small batch file that pre-processes the data, changing whatever characters to what other characters are needed, and then move on to the bulk load step.

No comments:

Post a Comment