MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Low and High Timestamp Values

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
maverick05
Beginner


Joined: 15 May 2005
Posts: 72
Topics: 24

PostPosted: Tue May 19, 2009 1:33 pm    Post subject: Low and High Timestamp Values Reply with quote

Hi.

I need to default a value to time-stamp when no data is present.

Ex: Within a SQL query,

Varable1 BETWEEN X AND Y

Variable1 is a db2 column of type timestamp.So if i get values for x and y ,then my cursor works correctly.But if i dont get values for x and y,my cursor is failing.
So i moved low-values to x and high-values to Y.The cursor failed since i think low-values and high-values are used for alphanumeric variables only, whereas this variable1 is a db2 timestamp of X(26) length.

So is their any way to pass a default value to this variable apart from move certain specific dates to both X and Y?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 19, 2009 3:01 pm    Post subject: Reply with quote

maverick05,

use the min and max values for a time stamp like this
Code:

MOVE '0001-01-01-00.00.00.000000'    TO X
MOVE '9999-12-31-00.00.00.000000'    TO Y


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Tue May 19, 2009 3:09 pm    Post subject: Reply with quote

kolusu you are too fast! maverick05 this is straight for the manual.
TIMESTAMP Timestamps. A timestamp is a seven-part value representing a date and time by year, month, day, hour, minute, second, and microsecond, in the range of 0001-01-01-00.00.00.000000 to 9999-12-31-24.00.00.000000.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
maverick05
Beginner


Joined: 15 May 2005
Posts: 72
Topics: 24

PostPosted: Wed May 20, 2009 7:53 am    Post subject: Reply with quote

Thank you all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group