Skip to Content
0
Former Member
May 14, 2008 at 08:32 PM

OPEN SQL - use of subquery to get max date

2370 Views

Hello,

I am trying to use a subquery to get the latest record, but cannot get the syntax correct.

select single from hrp1001 into mydata

where objid = '122334'

where begda = ( select max ( begda ) from hrp1001 where objid = '122334' )

but cannot get it right.

I am just trying to get the record with the max(date).

Thanks