Well that did the trick. Thanks, for the assistance.

 
Bruce Sorge

----- Original Message ----
From: "Bader, Terrence C CTR MARMC, 231" <[EMAIL PROTECTED]>
To: SQL <[email protected]>
Sent: Monday, March 26, 2007 7:57:09 AM
Subject: RE: Update a table with a sub-query

try

UPDATE tblCouncilEmailGroup
SET  tblCouncilEmailGroup.MemberID = tblCurrentCouncilMembers.Member_ID
FROM tblCurrentCouncilMembers INNER JOIN tblCouncilEmailGroup ON
tblCouncilEmailGroup.DONEID = tblCurrentCouncilMembers.DONE_ID
WHERE tblCouncilEmailGroup.DONEID = tblCurrentCouncilMembers.DONE_ID

By using the Inner Join you eliminate records that have null DONE_ID in
either table.  The Where clause really shouldn't be needed but I always use
to just make sure especially in db's I don't work with too often.  Also I
didn't use an editor so check for syntax and spellings.

~Terry








 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2798
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to