July 28, 2009 at 6:39 pm
SSIS Gurus,
I need some help with something that i am stuck with currently. I have a requirement to export data from a SQL Server table to a pipe delimited flat file for which i am using SSIS and is simple. Here's the challenging part, client wants the datetime and the string data wrapped with double quotes (") in the flat file and numeric data to be exported without the quotes.
Also the text file should list all the column names without the quotes, because of this i couldn't use the Text qualifier option in the Flat file connection manager.
To achieve this i am trying to use the Derived column transformation, however can't seem to get this working.
This is the expression that i am using in my Derived column transformation
ISNULL(Report_Date) ? "" : (DT_STR,12,1252)"" + Report_Date + ""
Am i doing something wrong there . The above doesn't give any error but doesn't wrap the datetime in quotes. If i try to to """" it doesn't accept the expression.
Does anyone know a solution to this?
Thanks in advance.
Amol
Amol Naik
July 29, 2009 at 6:43 am
Try escaping the quote marks like this
ISNULL(Report_Date) ? "" : "\"" + (DT_STR,50,1252)Report_Date + "\""
July 29, 2009 at 10:16 am
Thanks Paul, it worked.
Amol Naik
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply