Home » SQL & PL/SQL » SQL & PL/SQL » is there a system table that contains SYSDATE column
is there a system table that contains SYSDATE column [message #19663] Wed, 03 April 2002 03:04 Go to next message
Kevin
Messages: 45
Registered: February 2000
Member
Hi all,

I know you can do:

select sysdate
from dummy_table

and you will get the system date but I need to know where i can get the real COLUMN sysdate i.e in which tables.

thanks,
Re: is there a system table that contains SYSDATE column [message #19665 is a reply to message #19663] Wed, 03 April 2002 03:19 Go to previous messageGo to next message
Mike
Messages: 417
Registered: September 1998
Senior Member
Hi,

Why would you need this?

SYSDATE is just a simple function which doesn't require any parameters. So you can use it together with any table.

Here an simple example

SELECT SYSDATE, ename FROM scott.emp;

Mike
Re: is there a system table that contains SYSDATE column [message #19722 is a reply to message #19665] Thu, 04 April 2002 14:21 Go to previous message
Su
Messages: 154
Registered: April 2002
Senior Member
Hi Kevin,

There is no physical column defined for SYSDATE (as per my knowledge) as it is a predefined ORACLE identifier. As you know the SQL is an interactive language, you have to use an SQL statement like SELECT to retrieve the value of SYSDATE. You can use the SYSDATE not only in SELECT, can use also in UPDATE, INSERT, etc SQL statements. It is predefined ORACLE identified/variable which always changes with current date and time. It is not a column of any table. If it is, how can you use it in INSERT, UPDATE, etc statements without a table specification?
The problem is some thing else. Anyway what ORACLE are you using? I mean version.
OK, before you determine something, you first try the simple
SELECT SYSDATE FROM DUAL;
at SQL prompt. It is a basic SQL statement and should return with no error. If it is good, then the culprit is in your query/report. Check it out.
Good luck :)
Previous Topic: Getting wierd error compiling package
Next Topic: sql
Goto Forum:
  


Current Time: Fri Apr 19 16:16:28 CDT 2024