Stage Variable Problem
Posted: Thu Jan 27, 2011 6:18 pm
Hi,
I have a job which has 4 stage variables svYear, svMonth, svDate and sv1 = svYear:'-':svMonth:'-':svDate
svYear Varchar(4)
svMonth varchar(2)
svDate varchar(2)
sv1 varchar(10)
If the values for svYear is 2011, svMonth = 02 and svDate = 21 it is working fine and I'm getting output as 2011-02-21
but for the below data
svYear = 2011, svMonth = 02 and svDate = 01
the stage variable is not giving me the right output and the output is
2011 -02-0 and I'm missing 1 in the date field and also Datastage is placing a space after year if I have a date like 01, 02 ,03 etc. I noticed this using a peek stage.
Does any one know why this is happening.
Thanks,
Raju
I have a job which has 4 stage variables svYear, svMonth, svDate and sv1 = svYear:'-':svMonth:'-':svDate
svYear Varchar(4)
svMonth varchar(2)
svDate varchar(2)
sv1 varchar(10)
If the values for svYear is 2011, svMonth = 02 and svDate = 21 it is working fine and I'm getting output as 2011-02-21
but for the below data
svYear = 2011, svMonth = 02 and svDate = 01
the stage variable is not giving me the right output and the output is
2011 -02-0 and I'm missing 1 in the date field and also Datastage is placing a space after year if I have a date like 01, 02 ,03 etc. I noticed this using a peek stage.
Does any one know why this is happening.
Thanks,
Raju