Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL runs but fails inside a PL/SQL (ORACLE 8i)
Hi,
PL/SQL has a different (usually slightly older) parser that SQL.
While
SELECT (SELECT SYSDATE FROM dual) FROM dual;
works well
DECLARE now DATE;
BEGIN
SELECT (SELECT SYSDATE FROM dual) INTO now FROM dual;
END;
gets the same error as you do.
This is the case on 8.1.7.4. With 9.0 both versions are valid.
You might not use a (select ...) in the column list, but do a subselect
instead like
SELECT * from (SELECT SYSDATE FROM dual);
This should work on all recent oracle versions.
Stephan Received on Thu Feb 20 2003 - 08:14:15 CST
![]() |
![]() |