Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 how to remove double quotes around valuesinflatfi

Author  Topic 

dhani
Posting Yak Master

132 Posts

Posted - 2008-10-13 : 14:22:24

in my source file data, it contains double quotes around the each value
for ex (my file is toristdata.sdw it contains below data)
touristid,name,age[b]"12123","Ashlay","23"
"12124","Rob","12"
"12125","Melissa","32"
"12126","Kinter","31"[/
b]

so it loads data as it is (along with double quotes in each column), how can i eliminate these double quotes before load into database table
or any best way to avoid this double quotes

please give me any ideas

Thanks in advance
asini

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-13 : 14:45:53
You should use this:
http://www.mssqltips.com/tip.asp?tip=1316
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-13 : 14:56:56
How are you reading the file.
You can set text qualifier to double quote, comma as column separator and CrLf as row terminator.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

dhani
Posting Yak Master

132 Posts

Posted - 2008-10-13 : 14:58:57
quote:
Originally posted by sodeep

You should use this:
http://www.mssqltips.com/tip.asp?tip=1316



Sodeep,

now i got it,
its worked for me, thank you very much for your response

Regards
asini
Go to Top of Page

dhani
Posting Yak Master

132 Posts

Posted - 2008-10-13 : 15:00:03
quote:
Originally posted by Peso

How are you reading the file.
You can set text qualifier to double quote, comma as column separator and CrLf as row terminator.



E 12°55'05.63"
N 56°04'39.26"




Thank you peso,
i did same way as you suggested (by looking at sodeep suggested link)

best regards
asini
Go to Top of Page
   

- Advertisement -