Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > DB2 > System Date

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-01, 17:38
ryanveach ryanveach is offline
Member
 
Join Date: Dec 2001
Posts: 40
System Date

I am fairly new to DB2. I was wondering if somebody can tell me if there is a way to get the system date from DB2.
For example, in Oracle
SQL> select sysdate from dual;
SYSDATE
---------
17-DEC-01

where dual is just a dummy table. It can be any table_name.

Thanks
Reply With Quote
  #2 (permalink)  
Old 12-19-01, 08:48
Osias Correa Osias Correa is offline
Registered User
 
Join Date: Dec 2001
Location: Sao Paulo - Brazil
Posts: 6
You can try this one

db2 select current date from sysibm.sysdummy1

sysibm.sysdummy is the "Oracke dual" for DB2.
Reply With Quote
  #3 (permalink)  
Old 12-19-01, 20:07
ryanveach ryanveach is offline
Member
 
Join Date: Dec 2001
Posts: 40
That's exactly what I wanted. Thanks.
Actually I wanted more info like time etc..
So,
select current timestamp from sysibm.sysdummy1
worked better for me.
Reply With Quote
  #4 (permalink)  
Old 12-22-01, 11:53
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 3,641
easier is to use

values(current timestamp)

Cheers

Sathyaram

Quote:
Originally posted by ryanveach
That's exactly what I wanted. Thanks.
Actually I wanted more info like time etc..
So,
select current timestamp from sysibm.sysdummy1
worked better for me.
Reply With Quote
  #5 (permalink)  
Old 09-30-05, 07:21
sramesh sramesh is offline
Registered User
 
Join Date: Jun 2005
Location: Chennai
Posts: 15
sysibm.sysdummy1 ?

Can you tell me more about this in-memory table sysibm.sysdummy1.
?
__________________
Learning, Keep on learning.....
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On