July 29, 2010 at 1:59 am
In the input file i get have got many " (double quotes) in one of the column.
I use SSIS to transfer the data from flt afile to sql server table.
The problem i face is the string is 60 char long but without quotes.
Now, I want to replace " (double quotes) so that only 60 char goes to my SQL tabl
And i do not know what query should I use in derived column to replace quotes.
eg:
the input file has data like :
"uitgebr.rep.perif.zenuw znd transpl., tweede en vlgnde zenuw"
(it has length 62)
and i need result as
uitgebr.rep.perif.zenuw znd transpl., tweede en vlgnde zenuw
(i need length 60, omitting " )
July 29, 2010 at 3:30 am
this works for me!!
RTRIM(LTRIM(REPLACE(mycol,"\""," ")))
If there is any better way let me know!
July 29, 2010 at 7:43 am
This was removed by the editor as SPAM
July 30, 2010 at 6:04 am
Big fan of REPLACE()
Think great, be great!
August 9, 2010 at 10:28 am
I believe using TRIM() would give the following error:
Msg 195, Level 15, State 10, Line 3
'TRIM' is not a recognized built-in function name.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply