Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us