Results 1 to 4 of 4

Thread: Update and subquery

Threaded View

  1. #1
    Join Date
    Mar 2005
    Posts
    2

    Angry Update and subquery

    I have created a query and I recieve an error stating that the operation must use an updatable query. The query I am trying to update is updatable and is very basic I only want to update a price field. The query to update is merely a mirror of the underlying table itself. The Price I want to set it to is a list from a subquery. I created a query (contains all price changes for 1 month then averages them) I base my subquery on this.

    My update SQL is as follows:
    UPDATE SwingSwap1 SET SwingSwap1.AvgPrice = (SELECT LocalUpdateGD.PRICE FROM LocalUpdateGD Where LocalUpdateGD.[DDATE]=SwingSwap1.DeliveryMonth);

    I have even tried:
    UPDATE SwingSwap1, LocalUpdateGD SET SwingSwap1.AvgPrice = [LocalUpdateGD].[PRICE]
    WHERE (([SwingSwap1].[DeliveryMonth]=[LocalUpdateGD].[DDate]));

    If anyone can help it would be appreciated. Thanks in advance.
    Dennis
    Last edited by DenBurt; 03-01-2005 at 01:28 PM.

Posting Permissions

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