Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    7

    Question Unanswered: Multiple update query into single query

    hi

    I have used two update query. i want to change this query into one so that i can update the table in single query run.

    1. UPDATE RawExtract INNER JOIN PDB ON RawExtract.[buyer-Location_id]=PDB.Partner_Id SET RawExtract.Membership = PDB!DB_Membership;

    2. UPDATE RawExtract INNER JOIN PDB ON RawExtract.[buyer-Location_id]=PDB.Partner_Id SET RawExtract.Partner_Clubbed_ID = PDB!Partner_Clubbed_ID;


    Regards
    Santosh

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    UPDATE RawExtract 
    INNER 
      JOIN PDB 
        ON PDB.Partner_Id = RawExtract.[buyer-Location_id]
       SET RawExtract.Membership = PDB!DB_Membership
         , RawExtract.Partner_Clubbed_ID = PDB!Partner_Clubbed_ID
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2009
    Posts
    7

    Smile

    Hi Friend r937,


    Its worked, thanks a ton.

Posting Permissions

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