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.
Author |
Topic |
h.singh10
Starting Member
16 Posts |
Posted - 2011-12-22 : 13:06:40
|
HiI have two table and i am using a merge transformation in SSIS. The table looks like:Table 1:ID TYPE STATUS FIRST NAME100 RAC ACTIVE JOHN200 QWE ACTIVE MARK300 QAZ ACTIVE JOELTable 2:ID LASTNAME100 TAYLOR100 WAUGH200 LEE200 CHANG300 HUSSEYNow i am sorting the both table on ID and then using the merge transformation (not merge join). The merge transformation editor looks like:Merge input 1 Merge Input 2ID (SORT KEY:1) ID(SORT KEY:2)LASTNAME TYPE<IGNORE> STATUS<IGNORE> FIRSTNAMEThere are <ignore> in the merge input 1 because there are no more columns to map( Table 2 has two columns ans Table 1 has four columns)and the output in the FLAT FILE looks like :100, RAC, ACTIVE, JOHN100, TAYLOR, ,100, WAUGH, ,200, QWE, ACTIVE, MARK200, LEE, ,200, CHANG, ,300, QAZ, ACTIVE, JOEL300, HUSSEY, ,NOW FINALLY MY CONCERN IS HOW TO REMOVE THE COMMAS(,) HANGING AT THE BACK OF LASTNAME.They are hanging there because in the mapping there were some <ignore> columns. so they are nulls. I dont want any commas at the back.Is there any way we can take off these commas.ThanksHarry |
|
X002548
Not Just a Number
15586 Posts |
|
allan8964
Posting Yak Master
249 Posts |
Posted - 2011-12-28 : 14:42:00
|
Based on your description I assume that you have got flat text file right but you don't want the comma there as delimiter. If this is the scenario, go back to your data flow task editor, find the flat file connection manager, open it and choose columns at left side, then select the column delimiter as TAB{t} .... follow the process. Hope it help. By default SSIS choose comma as delimiter. |
|
|
|
|
|
|
|