Page 1 of 1

UDB Timestamp question

Posted: Tue Jul 25, 2006 10:00 am
by JPalatianos
Hi,
I am trying to load a Timestamp into a UDB table using the following and I get the warning message below.
(OCONV(DATE(), "D4-YMD[4,2,2]") : " " : OCONV(TIME(), "MTS:"))

WARNING MESSAGE:
TPA_CONTACT_PROCESSING..Dynamic_RDBMS_6: [DataDirect][ODBC DB2 Wire Protocol driver]Timestamp parameters with a scale, must have a scale less than ten and a precision equal to 20 plus the scale. You specified a precision of 26 and scale of 3. Error in parameter 26.

The Timestamp looks like this in UDB:
2005-10-13 13:27:36.934938


Thanks - - John

Posted: Tue Jul 25, 2006 3:08 pm
by DSguru2B
Increase the scale to 6.

Posted: Tue Jul 25, 2006 3:20 pm
by JPalatianos
Sorry, forgot to mention that I do have the scale coded as a 6.......It almost seems that it is ignoring it and setting it to 3. Output looks like:
2005-10-13 13:27:36.935000

Posted: Tue Jul 25, 2006 3:41 pm
by ray.wurlod
Where are you deriving the microseconds. DataStage's Time() function only delivers milliseconds - you need the System() function to deliver microseconds (and, even then, the operating system must support microseconds, and you may need a routine so that you can set $OPTIONS appropriately).

Posted: Tue Jul 25, 2006 3:57 pm
by JPalatianos
Thanks Ray, that explains it.......I was using the DataStage Time() function.