Fetch seven days old data
Posted: Wed Mar 23, 2011 9:01 pm
Hi Team,
We have a requirement to develop a datastage job which fetch 7 days old data in every run. Our source in DB2.
I have tried below user defined query in DB2
Select * from Temptable where effdate >'#BIzDate#-7' and effdate <='#BIzDate#'
But it did not work. BIzDate is a parameter which we are passing as 20110324 for todays run and final query should be formed as
Select * from Temptable where effdate >'20110317' and effdate <='20110324'
We need to implement all this in DB2 source stage only.
Any help on this would be great.
Thanks
Santosh
We have a requirement to develop a datastage job which fetch 7 days old data in every run. Our source in DB2.
I have tried below user defined query in DB2
Select * from Temptable where effdate >'#BIzDate#-7' and effdate <='#BIzDate#'
But it did not work. BIzDate is a parameter which we are passing as 20110324 for todays run and final query should be formed as
Select * from Temptable where effdate >'20110317' and effdate <='20110324'
We need to implement all this in DB2 source stage only.
Any help on this would be great.
Thanks
Santosh