J
JoZ via AccessMonster.com
I have two tables:
tbl1: id, start_dt, end_dt
tbl2, id, status, status_change_dt
tbl2 can have multiple rows for each id to show an id's different status
changed at different time. I need to join the two tbls and then only get the
latest status for each id. I can do two queries in Access (step1: Join 2tbls,
group and sort by Ascending; step2: get the 1st record of qry1). Can someone
write a SQL to do the same? I need to bring it to a unix environment. thx.
tbl1: id, start_dt, end_dt
tbl2, id, status, status_change_dt
tbl2 can have multiple rows for each id to show an id's different status
changed at different time. I need to join the two tbls and then only get the
latest status for each id. I can do two queries in Access (step1: Join 2tbls,
group and sort by Ascending; step2: get the 1st record of qry1). Can someone
write a SQL to do the same? I need to bring it to a unix environment. thx.