IN in Split Condition
HI, i am using a conditional split . i a situation in whihc one data is coming from source , its has 3 coulun name, amount , type and code. i had following condition if amount is 0 put replace name with "zero" if code is 7 or 8 replace name as xxx if type+cpde is OFT876,OTS987,OYH567 etc..... long list replace name with type not if type is OFM,OGD,OMR,OST.........long list then replace name with out of scope issue is how i can use TYpe in condition(like we use for a string in) to implement last two?
February 23rd, 2011 5:18am

Let's assume that neither type nor cpde contains a comma. Then you can use FINDSTRING: FINDSTRING("OFM,OGD,OMR,OST,", [type] + "," , 1 ) > 0 Russel Loski, MCT
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2011 5:38am

First you do not need conditional split you require Derived column. Use the expression for the 1st & 2nd conditions: [Amount]==0? "zero" : [Amount] For the name column : [Code] == 7 || [Code] == 8? "XXX" : [Name] For the last 2 conditions you could write an expression like: [type]+[code] == "OFT876" || [type]+[code] == "OTS987" || [type]+[code] == "OYH567 " || ...... ? [Tupe] : [Name] Similarly for the 4th condition. How ever a better approach(for 3rd & 4th condition) would be to create a staging table with the codes you mentiond and the corresponding value to be slected and then perform a lookup on the staging table. There is nothing is SSIS where you could use a conditon like IN or something. My Blog | Ask Me
February 23rd, 2011 5:43am

Thanks all, Raj. i am using the same for 3rd and 4th but i had a long list whihc make this condition too long that why i was thinking may be some hw i can use in and dont repeate [type]+[code] again and again. One small question any idea how long this condition can be. if in future i have to add more then can i add or not. thanks again
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2011 6:06am

Hi hassan, There is no limit as such that I am aware of. however I would advise you not to take this route as the package mintnance would be a big headache. In case of adding coditions or editing any thing. Why not use a lookup instead?My Blog | Ask Me
February 23rd, 2011 6:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics