[AccessD] Operation must use an updatable query

William Benson (VBACreations.Com) vbacreations at gmail.com
Wed Jun 8 14:09:57 CDT 2011


OK, I tried... Two different queries. Didn't work Asger

'First One;
UPDATE Tbl_Matched_Sites 
INNER JOIN                            <<< LEFT OR INNER HAD SAME RESULT
UpdateQryPart1on 
ON

Tbl_Matched_Sites.GIB_SITE_DB = UpdateQryPart1.SITE_DB
SET 
Tbl_Matched_Sites.GIB_Plant_Name= UpdateQryPart1.LastOfSite_Station_Name,
Tbl_Matched_Sites.GIB_Phys_Addr_1 = UpdateQryPart1.LastOfADDRESS_LINE1, 
Tbl_Matched_Sites.GIB_Phys_City = UpdateQryPart1.LastOfCITY, 
Tbl_Matched_Sites.GIB_Phys_State = UpdateQryPart1.LastOfSTATE_OR_PROVINCE, 


'Second Query - Name is ' UpdateQryPart1'
SELECT TblSites.SITE_DB, 
Last(TblSites.SITE_STATION_NAME) AS LastOfSITE_STATION_NAME, 
Last(TblSites.ADDRESS_LINE1) AS LastOfADDRESS_LINE1, 
Last(TblSites.CITY) AS LastOfCITY, 
Last(TblSites.STATE_OR_PROVINCE) AS LastOfSTATE_OR_PROVINCE, 
FROM TblSites
GROUP BY TblSites.SITE_DB;


For now I have given up and am going with lesser of two evils, which is an unnecessarily excessive number of updated rows.
I know others have solved this with temp tables but I do not want to bloat the database

Thank you for responding.





More information about the AccessD mailing list