Convertion Through derived column in SSIS
Hi all ,
I have one requirement in my work. that is
source column is(Effective date) like this (string datatype)
1111201
1120101
but my user requirement is convert to this value 201112,201201
Ex:- 110 converts to 2010,- 111 converts to 2011,- 112 converts to 2012 and - 0101 converts to 01,- 0201 converts to 02,- 0301 converts to 03
How to do this through derived column,Please help Him.....
vasu
November 11th, 2012 9:04am
Write multiple nested condition checks boolean_test ? true_result : false_result e.g.
@[User::StringVar] == "110" ? "2010" : @[User::StringVar] == "111" ? "2012" : "Next Chek Here"
Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2012 2:02pm
Hi all ,
I have one requirement in my work. that is
source column is(Effective date) like this (string datatype)
1111201
1120101
but my user requirement is convert to this value 201112,201212
Ex:- 110 converts to 2010,- 111 converts to 2011,- 112 converts to 2012 and - 0101 converts to 01,- 0201 converts to 02,- 0301 converts to 03
How to do this through derived column,Please help Him.....
Hi Arthur,
1111201, 1120101 I want first 111 digits convert to 2011 and next 4 digits skip the last 2 digits. This is source my source column(Effective date)
vasu
November 11th, 2012 11:53pm
y do u want to use derive column for specific ?
u can use an sql for it change date as effectivedate in ur scneario .
select '20'+right(left(date,3),2)+left(right(date,4),2) from test
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2012 12:14am
HI,
My destination database is DB2 and yes I want through derived column only loading
vasu
November 12th, 2012 12:30am
use this it worked for me .i had used sql server as destination
"20" + RIGHT(SUBSTRING(date,1,3),2) + SUBSTRING(RIGHT(date,4),1,2)
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2012 1:17am
HI Nishink,
This logic is working for me .Thnaks for your reply.
vasu
November 12th, 2012 2:00am