Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009

    Thumbs up Unanswered: Merge multipal update query into one


    I am using 4 different update query in my access db. each time i need to run all 4 update query whenever i make changes in my table. Can i create just one update for the same.

    Below is the update query which i am using in my table.

    ****** Query 1 ******

    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;

    ****** Query 2 ******

    UPDATE RawExtract SET RawExtract.[Sellthru Units] = RawExtract.[relationship sell thru Qty]+RawExtract.[Relationship sell thruoption Qty];;

    ****** Query 3 ******

    UPDATE RawExtract INNER JOIN Feb09 ON RawExtract.[product number]=Feb09.ProductCode SET RawExtract.[ListPrice(-X%)] = Feb09!ASPPrice
    WHERE RawExtract.[Fiscal month]="2009-02-01";

    ****** Query 4 ******

    IIf([segment]="IPG",[Sellthru Units]*[ListPrice(-X%)],IIf([product_line_id]="7A",[Sellthru Units]*[ListPrice(-X%)],[submitted Txn unit ST @LC(IN

    only)]*[Sellthru Units]))

    Pls help
    Last edited by sksoni75; 02-26-09 at 06:04.

  2. #2
    Join Date
    May 2008
    Raleigh, NC
    I'm not sure it would be too wise to try and create 1 massive update query to do it all. How about a macro or some code that runs all of them? Shouldn't cost you any more time and it would make the debugging a whole lot simpler if you can trace any issues to a particular query.

    --If its free, take it for what its worth!

Posting Permissions

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