Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: about SYSDATE function
Sybrand Bakker wrote:
>
> Sysdate is a pseudo function, it is NOT a column and you can't use it in any
> table as it is a reserved word.
> You may rest assured the type of sysdate is DATE and nothing else.
> Please check your Oracle documentation.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> <" srcnckpc"@hotmail.com> wrote in message
> news:3AC3E169.82AF1B6E_at_hotmail.com...
> > Hello: I get an error: (PLS-00302: component 'SYSDATE' must be declared)
> > when I run my code.
> >
> > --What is the datatype of v_dateA?
> > --Do I declare sysdate as a record? Can I declare it against any
> > table,e.g,
> > v_sysdate emp.sysdate%TYPE;
> >
> >
> >
> > set serveroutput on
> > ACCEPT p_char PROMPT 'Enter a specific date: '
> >
> > DECLARE
> > v_date varchar2(25) := '&p_char';
> > v_sysdate students.sysdate%TYPE;
> > v_dateA ------------???
> >
> >
> > BEGIN
> > SELECT sysdate
> > INTO v_sysdate
> > FROM students;
> >
> > SELECT months_between(v_date, v_sysdate)
> > INTO v_dateA
> > FROM students;
> >
> >
> > END;
> >
> >
> > Thanks so much for helping a newbie.
> >
(off topic) one things that's been touted for 8.1.7.1 and above is that calls to sysdate in PL/SQL no longer generated a nasty 'select sysdate from dual'
Yet to be proven or disproven
-- =========================================== Connor McDonald http://www.oracledba.co.uk (mirrored at http://www.oradba.freeserve.co.uk) "Some days you're the pigeon, some days you're the statue"Received on Fri Mar 30 2001 - 06:07:29 CST
![]() |
![]() |