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
 

 

how to fetch system date in db2 with syntax

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

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Tue Jan 17, 2006 10:06 am    Post subject: how to fetch system date in db2 with syntax
Reply with quote

can anybody tell me how to fetch system date in db2 with syntax.

thanx in advance
regards...
manjinder
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 17, 2006 10:28 am    Post subject:
Reply with quote

Hi -

CURRENT_DATE is a DB2 special register, and is well documented (with example) in the fine manual.

O.
Back to top
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Tue Jan 17, 2006 10:33 am    Post subject: what is in insert
Reply with quote

what should be there in insert query for fetching system date.
thanx in advance.
regards..
manjinder
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 17, 2006 10:41 am    Post subject:
Reply with quote

As you can see in the fine manual, when you CREATE a table you can define the column as DATE type. If you specify "WITH DEFAULT" for that column, its default will be CURRENT DATE when you insert new row.

O.
Back to top
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Tue Jan 17, 2006 11:05 am    Post subject: related system date
Reply with quote

thanx alott ofer it is wrking i am able to fetch system date and system timestamp.
thanx alottt for your help..
regards..
manjinder
Back to top
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Tue Jan 17, 2006 11:13 am    Post subject: views,synonym and alias
Reply with quote

please let me know the differences between alias,synonym and view
and tell me why we drop only views not synonym and alias because they dont take memory space or what?
thanx in advance.
regards...
manjinder
Back to top
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Tue Jan 17, 2006 11:19 am    Post subject: regarding views,alias and synonym
Reply with quote

please let me know the differences between alias,synonym and view
and tell me why we drop only views not synonym and alias because they dont take memory space or what?
thanx in advance.
regards...
manjinder
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 17, 2006 11:24 am    Post subject:
Reply with quote

Here are the definitions from the fine manual:
- Alias
- View
- Synonum

You can DROP alias, view or synonym, according to the manual.

O.
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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


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