Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> about SYSDATE function
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. Received on Fri Mar 30 2001 - 01:19:17 CST
![]() |
![]() |