...

View Full Version : sql statement



havey
04-04-2006, 12:09 AM
what i'm trying to do (same db different tables):

currently recruitmentLists.MD_Select is blank and would like to update it with the Member.MD_SelectID values where the records match recruitmentLists.ID and Member.MemberID


what i have so far:

SELECT Member.MD_Select, Member.MD_ID, recruitmentLists.MD_Select, recruitmentLists.ID
FROM recruitmentLists, Member
WHERE recruitmentLists.MD_Select = ' '
SET recruitmentLists.MD_Select = Member.MD_Select
WHERE Member.ID = recruitmentLists.ID


any suggestions?

Roelf
04-04-2006, 08:48 AM
what i'm trying to do (same db different tables):

currently recruitmentLists.MD_Select is blank and would like to update it with the Member.MD_SelectID values where the records match recruitmentLists.ID and Member.MemberID


what i have so far:

SELECT Member.MD_Select, Member.MD_ID, recruitmentLists.MD_Select, recruitmentLists.ID
FROM recruitmentLists, Member
WHERE recruitmentLists.MD_Select = ' '
SET recruitmentLists.MD_Select = Member.MD_Select
WHERE Member.ID = recruitmentLists.ID


any suggestions?

UPDATE recruitmentLists
SET recruitmentLists.MD_Select = Member.MD_Select
FROM Member
WHERE Member.ID = recruitmentLists.ID



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum