Hi,
I am writing a query that uses the max function. I have:
SELECT *
FROM myTable
WHERE term_dt = '01/01/1900' AND
bus_type <> "G"
GROUP BY id_num
HAVING effect_dt = max(effect_dt) AND co_id <> "001"
ORDER BY id_num
This seems to work, but I am not comfortable with it. Is there a better way of doing this query.
Thanks,
Mark
I am writing a query that uses the max function. I have:
SELECT *
FROM myTable
WHERE term_dt = '01/01/1900' AND
bus_type <> "G"
GROUP BY id_num
HAVING effect_dt = max(effect_dt) AND co_id <> "001"
ORDER BY id_num
This seems to work, but I am not comfortable with it. Is there a better way of doing this query.
Thanks,
Mark