I am using 8i 8.1.6 on NT. I want to execute a Top-N query in a PL/SQL
package. For example
Select colA, colB, colC, colD into a, b, c, d
from ( select colA, colB, colC, colD from tableA order by ID )
where rownum = 1;
If I just include the SQL in a procedure, the compiler keep telling me the
last bracket is not supposed to be there.
If I put the SQL in a varchar2 and use execute immediate statement, it
passes the compiler and the SQL works.
Any idea?
Ling
Received on Tue Oct 17 2000 - 19:05:43 CEST