Home » Developer & Programmer » Forms » Select the maximum value
Select the maximum value [message #85822] Mon, 02 August 2004 03:28 Go to next message
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
Re: Select the maximum value [message #85828 is a reply to message #85822] Mon, 02 August 2004 04:56 Go to previous message
Karthik
Messages: 63
Registered: February 2000
Member
You can use ORDER BY in the inner query in FORMS 9I VERSION, where as its not possible to use in FORMS 6I
Previous Topic: bad bind variables
Next Topic: How to display the count of records from a data block
Goto Forum:
  


Current Time: Wed May 15 15:28:20 CDT 2024