locked
Conditional split RRS feed

  • Question



  • my source file data look life

    1,2,3,4,5
    2,3
    1,2,3,4,5
    2,3

    i am upload data into two separate tables as per Row based.

    i trying like DFT--> FLAT FILE SOURCE-->CONDITIONAL SPLIT--<SCRIPT COMPONENT-->DESTINATION.

    but how can i identity the length of ROW in CONDITIONAL SPLIT . i am planing based on length of row i will be upload data into target
    Monday, March 1, 2010 1:11 PM

Answers

All replies

  • I'm sure the answer isn't really this easy but can you not just add up the lengths of all the columns?


    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Monday, March 1, 2010 1:37 PM
  • what is the best way can u tell me. how can i achieve
    Monday, March 1, 2010 2:05 PM
  • Yes, use the LEN function . Like this:

    LEN([column1]) + LEN([column2]) + LEN([column3]) + ... + LEN([columnN]


    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    • Proposed as answer by Jamie Thomson Monday, March 1, 2010 2:14 PM
    • Marked as answer by Zongqing Li Friday, March 5, 2010 7:23 AM
    Monday, March 1, 2010 2:14 PM
  • why did u go like column 1 or column 2 like that. we will get only single column right.
    i didn't understand ur thoughts . plz explain clearly
    Monday, March 1, 2010 2:17 PM
  • why did u go like column 1 or column 2 like that. we will get only single column right.
    i didn't understand ur thoughts . plz explain clearly

    I have explained it as clearly as I possibly can. You now seem to be saying that you only have one column, well, you haven't stated that previously so how could I know that? Perhaps you need to explain the problem a little more clearly?
    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Monday, March 1, 2010 2:35 PM
  • Hi suresh,
    You discription of the issue is not very clear.
    If you are getting all the records in one column instead of 1,2,3... or so columns, you could directly take the LEN(Column1) in ur conditional split and compare it with ur requirement.

    How ever I feel it is not the right way as the column lengths will vary with actual records. will the Columns just have single digit between the commas?
    What in case you have multiple digits between the numbers? will you then be able to separate the records based on just the lenght of the column or you need to chek the position of the commas??
    Hope this helps !!
    Sudeep Raj   |    My Blog |    SSIS Samples
    Tuesday, March 2, 2010 10:47 AM