I am trying to import data from falt files (.CSV) into SQL table. I am able to import them no problem but the data is coming with double quotes. What is the best way of resolving this problem?
Regards,
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityI am trying to import data from falt files (.CSV) into SQL table. I am able to import them no problem but the data is coming with double quotes. What is the best way of resolving this problem?
Regards,
If you have mixed data, where some are double quoted and others are single, another option would be to load the complete data into a column and have a computed column in the same table that is running a function to strip out the unwanted characters from the source column. something like this:
create table [xxxx] ( originalcol varchar(50) null, [$$derived] as replace(originalcol,'"','') )
Just saying it may be easier doing it in SQL then SSIS