Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> about SYSDATE function

about SYSDATE function

From: <_at_hotmail.com>
Date: Fri, 30 Mar 2001 07:19:17 GMT
Message-ID: <3AC3E169.82AF1B6E@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. Received on Fri Mar 30 2001 - 01:19:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US