October 20, 2010 at 10:01 am
Hi All,
I am passing a departname in the header. And my departname as comma in it. Example : Expense,Sales
Since I am loading the data to the CSV. Expense and sales are getting separated where as i want them to be together by adding Qquatations to the string like " Expense,Sales". But I am not sure of how i can do this task. Please give me Ideas.
Thanks,
Preensheen
October 20, 2010 at 11:17 am
If you specify a data qualifier in your export, all of the fields will be enclosed in quotes (or whatever character you choose for it).
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 20, 2010 at 11:56 am
GSquared (10/20/2010)
If you specify a data qualifier in your export, all of the fields will be enclosed in quotes (or whatever character you choose for it).
I did have specified the tect qualifier to my CSV export but ..it doesn't work for header.
Please give me suggestions on the best way I can resolve my issues.
October 20, 2010 at 1:49 pm
How are you building the header? If I remember correctly, you're using a local variable to do that. Can't you just add the quotes in the code where you build the header?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 20, 2010 at 2:15 pm
GSquared (10/20/2010)
How are you building the header? If I remember correctly, you're using a local variable to do that. Can't you just add the quotes in the code where you build the header?
My header is Dynamic, I will be storing the value coming from foreach to a variable and then pass that variable as the header. So I can't add the quotes when passing. If we can..please do tell me the steps.
Thanks for the support
Preensheed
October 20, 2010 at 11:56 pm
Can you side-step the problem by replacing commas in your header variables with some other character before they are output? Or by using a different column delimiter everywhere else (eg ¦)?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 21, 2010 at 1:11 pm
preensheen (10/20/2010)
GSquared (10/20/2010)
How are you building the header? If I remember correctly, you're using a local variable to do that. Can't you just add the quotes in the code where you build the header?My header is Dynamic, I will be storing the value coming from foreach to a variable and then pass that variable as the header. So I can't add the quotes when passing. If we can..please do tell me the steps.
Thanks for the support
Preensheed
SSIS has functions in it for concatenating strings. How you do it depends on how exactly you're building the header.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 28, 2010 at 12:21 pm
GSquared (10/21/2010)
preensheen (10/20/2010)
GSquared (10/20/2010)
How are you building the header? If I remember correctly, you're using a local variable to do that. Can't you just add the quotes in the code where you build the header?My header is Dynamic, I will be storing the value coming from foreach to a variable and then pass that variable as the header. So I can't add the quotes when passing. If we can..please do tell me the steps.
Thanks for the support
Preensheed
SSIS has functions in it for concatenating strings. How you do it depends on how exactly you're building the header.
October 28, 2010 at 12:39 pm
Why can't you just include the double quotes in with the header variable? How are you getting the header variable into the file?
October 28, 2010 at 3:28 pm
John Rowan (10/28/2010)
Why can't you just include the double quotes in with the header variable? How are you getting the header variable into the file?
Thanks a lot for all your support..I was able to resolve it by the way you mentioned it.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply