Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Default values for Timestamp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 31
Location: visakhapatnam

PostPosted: Thu Aug 07, 2008 1:59 pm    Post subject: Default values for Timestamp
Reply with quote

I have a added a new column name with the type Timestamp(neither create nor updated - it is just a time its opertated based on when the decision took) in my table.

If I get the value i will insert it.

The question started what if I won't get a value of the timestamp
Here I guess I need to move the default value.

Since it is the the timestamp what I need to move?
Can I move Zeroes or Spaces?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 07, 2008 2:10 pm    Post subject:
Reply with quote

'0001-01-01-12.00.00.000001'
Back to top
View user's profile Send private message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 31
Location: visakhapatnam

PostPosted: Thu Aug 07, 2008 2:36 pm    Post subject:
Reply with quote

Thanks for quick response.
But can't we give 0001-01-01-00.00.00.000000?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 07, 2008 2:53 pm    Post subject:
Reply with quote

rsm_deepak wrote:
Thanks for quick response.
But can't we give 0001-01-01-00.00.00.000000?


yes...........
Back to top
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Thu Aug 07, 2008 7:19 pm    Post subject:
Reply with quote

Hi rsm,

I think you can give 0001-01-01-00.00.00.000000. Please check. I used this in my program.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Fri Aug 08, 2008 8:31 pm    Post subject: Reply to: Timestamp Question
Reply with quote

Declare the timestamp column as Nullable. If the timestamp value is missing in the input then move -1 to the null indicator variable else move zero to the null indicator and input timestamp to the host variable. Insert the row into the table. the suggestion is given based that you are going to design the column & column type.

Thanks
Karthikeyan

[S/360] was the biggest, riskiest decision I ever made, and I agonized about it for weeks,but deep down I believed there was nothing IBM couldn't do.
- Tom Watson, Jr. IBM Chairman and CEO 1961-1971
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us