Reg: Timestamp

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Reg: Timestamp

Post by bikan »

Hi All,

My target is DB2 one column datatype is timestamp(26) how can i pass Data Stage timestamp value into that field.

DB2 Timestamp format is different and Data Stage farmat is different.


Please give me a suggestion on above matter.

Thanks
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Use timestamp, with extended property to millisecods
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What do you mean by DataStage format??? If you mean internal format then it can be manipulated with OCONV. For time, again, use ICONV/OCONV functions with "MTS". But MTS doesnt handle anything lower than seconds. DB2 will add the nano seconds.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Cool... nanoseconds. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Yea, it does sound cool doesnt it. But corrections, nano is a billionth of a unit. Micro is a millionth of a unit which DB2 stores. So, my apologies. Db2 will add the microseconds upon insert. :P
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Closer... milliseconds.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could always concatenate Rnd(1000) :lol:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

chulett wrote:Closer... milliseconds.
Really, I was under the impression that SQLServer stores milliseconds (length 23) and DB2 stores microseconds (Length 26).
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't think so... but glad to be proven wrong. Let us know. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I am pretty sure Craig. Check thiswebsite out. Scroll down to the heading "Precision". It has a table layed out for timestamp precision for Db2, Oracle and SqlServer. :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, there you go... microseconds it is. 8)

Code: Select all

DBMS    MINIMUM MAXIMUM                    DEFAULT 
DB2     0       6 (to nearest microsecond) 6 
Oracle  0       9 (to nearest nanosecond)  6 
SQL Sv  0       3 (to nearest millisecond) 3 
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Hehe, i think we are trying to prove the same thing. THats exactly what i said, SqlServer stores milliseconds and Db2 microseconds. Ah what the hell, Potato Potaato, same thing :)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Because no-one can do it, let's all demand picoseconds! :lol:
After all, processors are getting faster. We may need to start talking about partial binary digits.

"It's probably all about quantum"
-- Archchancellor Mustrum Ridcully
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

No doubt. Within no time we shall be talking in femto and atto seconds. Zepto and yoctoseconds are not far off either. :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Nah. Inflation will set in, and they'll devalue the second.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply