Select the maximum value [message #85822] |
Mon, 02 August 2004 03:28 |
Jamil
Messages: 13 Registered: December 2003
|
Junior Member |
|
|
Dear Friends
I want to select the maximum value according the following script
select H_TRANS_DATE,NVL(D_CURRENT_METER,0) INTO L_DATE,LOC_VAR
from (select d_current_meter,H_TRANS_DATE
FROM MAINTENANCE_HEADER
WHERE H_CAR_NO=:REC_MASTER.H_CAR_NO
AND MAINTENAMCE_STATUS = 2
order by H_TRANS_DATE desc)
where rownum = 1;
it works fine in sqlplus and it gives the correct result, but when I copy the same code to my Oracle Forms Builder it gives the following Error 103 at line 23 column 16 encountered symbol “ORDER” when
expecting one of the following) * &
When I remove the order by the error message goes but I am not getting the correct result ,how can I correct this script
Best Regards
Jamil
|
|
|
|