02-26-09, 03:06 #1Registered User
- Join Date
- Jan 2009
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
Last edited by sksoni75; 02-26-09 at 05:04.
02-27-09, 11:49 #2Registered User
- 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.
Stu--If its free, take it for what its worth!