Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: sql statement

  1. #1
    Regular Coder
    Join Date
    Mar 2003
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow sql statement

    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?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    Quote Originally Posted by havey
    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
    I am the luckiest man in the world


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •