DTS selected columns from text file [resolved]
Guys
I need to create a dts package to import a text file into sqlserver. This is fine but the problem I'm having is that the text file contains 4 columns and I only want to import the 3rd column. Again, this is no problem. The problem comes when I want to add an id column to the table. I've checked enable identity insert but it doesn't seem to work.
Any ideas?!
Thanks
Re: DTS selected columns from text file
I would bulk insert it into a temporary table and then use a stored procedure to re-work it with the extra column and do the final insert.
Actually, we have a little program called TEXTIMPORT that we keep ripping and customizing to do the odd types of IMPORT's that we need. We probably have 25 versions of it now - all specific to various requirements.
It also has a .INI file, so that if something simple changes, we can control some aspects of how it imports.
Got the same thing for output - called TEXTOUTPUT.
Re: DTS selected columns from text file
Sounds like a good plan to me. Cheers, I'll give it a crack!
:thumb: