|
Hi all, I have some membership numbers being imported in an SSIS package. One of our customers has an extra long account number so we would like to split the last two characters off and insert a whitespace, forwardslash, whitespace and the remaining two characters as an identifier. For example : 100418032766000999 would then be 1004180327660009 / 99 . How can this be done as an SSIS expression? I was thinking maybe a combination of substring/replace maybe in a derived column transform? Thanks for your help!
(comments are locked)
|
|
Yes, I guess you are on the right track but my combination would be LEN and SUBSTRING/RIGHT, something like I guess the code may not be perfect, but should give you the hint. Thanks Usman that's great what would the equivalent SQL statement be? I just want to test it against the data...
Apr 10 '12 at 02:38 PM
jhowe
I guess that could be But I am not sure of it either as I cannot test it at the moment.
Apr 10 '12 at 02:56 PM
Usman Butt
For the moment we're assuming full acc numbers are always 18 digits. We may reject numbers greater than this so I've come up with this, i'm guessing this will behave the same way as what you've provided?
Apr 10 '12 at 03:16 PM
jhowe
I am confused a bit :) Your script have AccNumber and MembershipNumber? Are they both the same? OR the MembershipNumber's last two digits have been added intentionally to make all the accounts eighteen character long (provided with the minimum account length is sixteen characters) with the same pattern? And if you have to reject the accounts more than eighteen characters long then a WHERE clause may be needed. Since the logic is unknown to me I can only guess that your script seems to be to doing the right thing :)
Apr 11 '12 at 05:06 AM
Usman Butt
(comments are locked)
|
|
Something to cosider is a mechanism that accepts variable length account numbers, such as : This is the TSQL version but you should be able to transfer it to SSIS if you need to
(comments are locked)
|
|
This is what I came up with in the end thanks everyone for your help!
(comments are locked)
|

