Hi,
I have a table for each keyfield i have multiple records. i Want to get the latest modified records for each keyfield.
I am trying this
but i am getting latest mofidied record among all keyfields..i.e. only single record.
How can i acheive the desired result.
I have a table for each keyfield i have multiple records. i Want to get the latest modified records for each keyfield.
I am trying this
Code:
select S.keyfield, S.status, PT.producttemplatename from SERVICE S, SERVICETEMPLATE ST, PRODUCTTEMPLATE PT
where S.keyfield in (1234, 5678)
and S.servicetemplateid = ST.servicetemplateid
and ST.producttemplateid = PT.producttemplateid
order by S.modifieddate desc limit 1 ;
How can i acheive the desired result.