June 10, 2016 at 12:04 pm
Here is the agebucket column: 12-24
need lowerbound :12 and upperbound:24
Right now I wrote expression in tsql something like below:
Substring([AgeBucket],0,CharIndex('-', [AgeBucket])) As LowerBound
,LTRIM(REPLACE(Substring([AgeBucket],CharIndex('-', [AgeBucket]),3),'-','')) As UpperBound
How can we re-write as SSIS expression ?
June 10, 2016 at 12:16 pm
komal145 (6/10/2016)
Here is the agebucket column: 12-24need lowerbound :12 and upperbound:24
Right now I wrote expression in tsql something like below:
Substring([AgeBucket],0,CharIndex('-', [AgeBucket])) As LowerBound
,LTRIM(REPLACE(Substring([AgeBucket],CharIndex('-', [AgeBucket]),3),'-','')) As UpperBound
How can we re-write as SSIS expression ?
TOKEN( "12-24","-",1 )
TOKEN( "12-24","-",2 )
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
June 10, 2016 at 12:24 pm
thing is agebucket column has "(other)" as value and "65+" this is not working:(
how to check if this values exists just palce this value in the column?
June 10, 2016 at 12:42 pm
Use the conditional.
TOKEN( @[User::AgeBucket],"-",1) == @[User::AgeBucket] ? TOKEN( @[User::AgeBucket],"+",1) : TOKEN( @[User::AgeBucket],"-",1)
June 10, 2016 at 12:54 pm
komal145 (6/10/2016)
thing is agebucket column has "(other)" as value and "65+" this is not working:(how to check if this values exists just palce this value in the column?
This is important information. Had you included it in your initial post, I would have provided a different answer.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply