P
Pete
I am using Access 2007.
I have 2 tables tblStock and tblStockPriceHistory. Each night I append the
latest stock price data to the tblStockPriceHistory. I then want to run an
update query to update tblStock to show the date of the most up to date data.
My first query (qryStockPriceHistoryLastDate ) finds the maximum date for
each stock from tblStockPriceHistory.
SELECT DISTINCT tblStockPriceHistory.cStockCode,
Max(tblStockPriceHistory.dClosingDate) AS MaxOfdClosingDate
FROM tblStockPriceHistory
GROUP BY tblStockPriceHistory.cStockCode;
I then wish to update the corresponding stock record in tblStock. When I try
to run the following query I get this error "Operation must use an updateable
query"
UPDATE tblStock INNER JOIN qryStockPriceHistoryLastDate ON
tblStock.cStockCode = qryStockPriceHistoryLastDate.cStockCode SET
tblStock.dLastUpdated = [qryStockPriceHistoryLastDate].[MaxOfdClosingDate];
I have 2 tables tblStock and tblStockPriceHistory. Each night I append the
latest stock price data to the tblStockPriceHistory. I then want to run an
update query to update tblStock to show the date of the most up to date data.
My first query (qryStockPriceHistoryLastDate ) finds the maximum date for
each stock from tblStockPriceHistory.
SELECT DISTINCT tblStockPriceHistory.cStockCode,
Max(tblStockPriceHistory.dClosingDate) AS MaxOfdClosingDate
FROM tblStockPriceHistory
GROUP BY tblStockPriceHistory.cStockCode;
I then wish to update the corresponding stock record in tblStock. When I try
to run the following query I get this error "Operation must use an updateable
query"
UPDATE tblStock INNER JOIN qryStockPriceHistoryLastDate ON
tblStock.cStockCode = qryStockPriceHistoryLastDate.cStockCode SET
tblStock.dLastUpdated = [qryStockPriceHistoryLastDate].[MaxOfdClosingDate];