December 27, 2007 at 11:17 pm
i am importing data from csv file to database. but csv files are of different formats like some file contains data of format
---->abc,bbb,ggg
---->"123" "fff" "fgg"
---->shgvgf kjgh lkjhg
in order to import these formats what i suppose to do? please reply
December 27, 2007 at 11:51 pm
Step 1... take the data provider out to dinner... feed the data provider a nice juicy pork chop... with a slingshot!
Seriously... my first step would be to get the data provider to clean up their act! If it's "one time" data, I'd still ask them to clean it up.
Now, if you boss is standing on your lower lip and pulling up hard on your nostrils to get this done, you'll need to import the file into a single wide column and conditionally make three passes at the data to be able to handle the 3 different delimiters.
Another way would be to make 3 different BCP Format files and allow a bazillion errors... again, 3 passes at the data...
I'm still thinking the pork chop is a really good idea 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2007 at 2:24 am
Can you explain in detail please..
December 28, 2007 at 2:37 am
checkthis
http://204.9.76.233/articles/dba/import_text_files_ssis_p1.aspx
My Blog:
December 28, 2007 at 11:38 am
pavithag_clarion (12/28/2007)
Can you explain in detail please..
Dinesh's fine solution will work for SSIS... I just don't like SSIS 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply