Page 1 of 1

Cannot append %DateIn Metatags to target DRS

Posted: Mon Nov 28, 2005 4:02 am
by poornimajayan
Hi,
When I converted my target DRS to a userdefined SQL and when I used %DateIn to a Date field, Data Stage is not taking the same. If I use a %Substring, it is taking. This issue occurs in DB2 OS390. If I won't use this ,Datastage is giving an error Inserted value too larger for the column since the target will accept only date and not the time.Does anyone have any suggestions?

Posted: Mon Nov 28, 2005 4:06 am
by Andal
Hi Poornima

You are using a DRS, Then why you are going for userdefined SQL, which will remove the "D"ynamic Part.

Posted: Mon Nov 28, 2005 4:28 am
by poornimajayan
Hi Andal,
This is because my target accepts only the Date and not the DateTime. If you use the Generated one, it will automatically append the Time part also to the Date which I am passing since DataStage will convert into that format.That is why I used the Userdefined one.

Posted: Mon Nov 28, 2005 5:36 am
by ray.wurlod
What is the precise data type of this column in the database table? Date or TimeStamp? Different databases handle this differently - some (such as Oracle) don't differentiate, while others do. What this means mostly is that you can't assume that what works with one database will work with another. DRS has the terrible tendency to do things the Oracle way. Have you considered using a DB2/UDB stage?

Posted: Mon Nov 28, 2005 8:17 am
by chulett
Have you considered doing the equivalent in the job before sending it off to the DRS stage?

Posted: Tue Nov 29, 2005 12:39 am
by poornimajayan
Ray,
I using a normal DRS and my Job should work independent of the databases(Oracle/DB2/SQL Server).The issues I quoted is DB2 specific and there the undelying datatype is Date.But while passing the value to the target, the DRS automatically takes the time part.That is why I am using the Metatag and making the target as userdefined one.
Thanks,
Poornima.

Posted: Wed Nov 30, 2005 12:56 am
by ray.wurlod
"Should". Famous last words. Read my earlier post again.