Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Possible Use of a Cursor
Casey,
I tried your suggestion and it looks like it should work. However I get the error message ORA-00933 command not properly ended. The cursor highlights the beginning of the 2nd SELECT statement. The error message has something to do with using the ORDER BY function. I took out the ORDER BY (which defeats the purpose of using the FIRST_VALUE function) and get the same problem.
Here's a copy of what I have written:
select papp.INSTRUCTION_NR,papp.MACHINE_PROC,papp.POSITIONS_NR
from w100.papp
(select first_value(papp.MACHINE_PROC)
over (partition by papp.INSTRUCTION_NR order by papp.POSITIONS_NR)
first_MACHINE_PROC from tab)
where papp.MACHINE_PROC in (3600,3400,3430)
Received on Wed Feb 23 2005 - 02:23:27 CST