Conditional Split according to commas
Hi Guys, Source Input: H, 2, 240190, 08, 50, 01, 02, 2009, complete H, 1, 353474, 06, 52, 01, 01, 2009 H, 1, 1197222, 07, 05, 01, 04, 2010, complete, Sale, 28.20, 21.80 I need a conditional split expression to split above rows according to the , count. Count of commas are 7, 8 and 11. So I need to split above lines into three separate files. All I need is to split above lines using comma count, I amusing below expression but its not working. FINDSTRING([Column 0],",",7) == 0 FINDSTRING([Column 0],",",8) > 0 && FINDSTRING([Column 0],",",8) < 8 FINDSTRING([Column 0],",",11) > 0 && FINDSTRING([Column 0],",",8) == 11 Thanks in Advance,
October 22nd, 2010 2:59am

Create an output in conditional split for count 7 using: LEN(REPLACE(Col,",",",,")) - LEN(Col) == 7. Similarly create output for 8 and 11 counts.Nitesh Rai- Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2010 3:52am

Hi Nitesh, Thanks for the reply. However it getting all the rows, instead of getting only 7 count comma rows. Thanks,
October 22nd, 2010 4:12am

Have you created 3 outputs in conditional split using 3 different expressions? Nitesh Rai- Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2010 4:15am

Hi Nitesh, It worked when I tried 3 different expressions. But can you please guide me what exactly the expression is doing. I am newibe to ssis Thanks,
October 22nd, 2010 4:18am

No I am trying only with one file it contains only 7 commas. Do I need to test all three expressions at a time Yes. One expression will redirect the rows with count as 7, one will redirect the rows with count as 8 and so on. Also, you need to take the appropriate output of conditional split to the respective destination. For ex, if count 7 has to be taken to destination1 then connect the count7 output of conditional split to destination1 and so on.Nitesh Rai- Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2010 4:25am

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

Other recent topics Other recent topics