Need help with a query

From: Sandy80 <svarshneymail_at_gmail.com>
Date: Tue, 15 Dec 2009 03:00:52 -0800 (PST)
Message-ID: <c3a6e8bb-be42-4365-8423-fdf097151da6_at_s20g2000yqd.googlegroups.com>



Hi,

I need help with a query which involves the 2 tables defined below. What I need to do is choose the record with the max “Eff Date” from “Table A” for a particular “Emp No.” and update the “Desc” from that record in the field “Desc” of “Table B” for the same “Emp No.”. I am able to choose the max “Eff Date” record for each employee from Table A but somehow not able to updated the same “Desc” in “Table B”.

Request you to please help the query. Any help would be appreciated. Thanks!

Table A

Emp No.	Group	Eff Date	               Desc
1234	CI	01/01/1989	X
1234	CI	01/02/2000	X
1234	CI	01/02/2006	A
2345	AF	01/01/1990	X
2345	AF	01/02/2005	A

Table B
Emp No.	Group	Desc
1234	CI	X
2345	AF	A
3456	CI	A
Received on Tue Dec 15 2009 - 05:00:52 CST

Original text of this message