Hi,
I have a table with multiple records for each ID. The records all have an effective date & I wish to return only the 75 or so records out of 20,000 that are the most recent for each id...
i.e. for each ID, return the record corresponding to the maximum effective date...
In access, I managed to do this with the following SQL
I have tried a number of ways to achieve similar results in Crystal but with little success.... any advice would be appreciated,
Thanks
I have a table with multiple records for each ID. The records all have an effective date & I wish to return only the 75 or so records out of 20,000 that are the most recent for each id...
i.e. for each ID, return the record corresponding to the maximum effective date...
In access, I managed to do this with the following SQL
Code:
SELECT dbo_grup.id, Max(dbo_gchg.effective) AS MaxOfeffective
FROM dbo_grup INNER JOIN dbo_gchg ON dbo_grup.rowno = dbo_gchg.rowno_grupgchg_grup
WHERE (((dbo_grup.id)=[dbo_gchg].[id]))
GROUP BY dbo_grup.id;
I have tried a number of ways to achieve similar results in Crystal but with little success.... any advice would be appreciated,
Thanks