This content has been marked as final. Show 3 replies
This is really a SQL query, not much to do with Forms.
Something like this.
BTW, DATE is a reserved word and cannot be a column_name.
SELECT .... FROM <DETAIL_TABLE> WHERE <DETAIL_TABLE>.<DATE_COLUMN> = (SELECT MAX(<DETAIL_TABLE>.<DATE_COLUMN>) FROM <DETAIL_TABLE> WHERE <DETAIL_TABLE>.<FK_COLUMN> = 'AA' ) .....
The equivalent of the WHERE Clause above is what you need to put into the detail block.
For any better response, you should post the actual query with actual table/column names.
Edited by: Prabodh on May 26, 2012 1:02 PM
Pls use the property bloc-level
Then,write ur condition statement there...
Is your block is a query only and you don't have to do DML then pls create a view and use the view as datablock-datasource.
But if you have to apply DML so u have to use your "group by"-query in a database-view and do the dml in an insted-of-trigger on the view.
In this case the form would just issue the DML againt the view as if it is a "*normal*" table.
Hope this helps...