Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009
    Posts
    15

    Unanswered: Update Query based on Select Query Results

    Hi,

    I have been searching high and low and am having difficultly figuring out how to run an Update Query based on a Select Query.

    Here is the Select Query and any help would be appreciated. Thanks!

    SELECT ShipmentData.Customer, Min(ShipmentData.[Date/Time]) AS [MinOfDate/Time], Min(ShipmentData.OrderNumberTrimmed) AS MinOfOrderNumberTrimmed, ShipmentData.ShipmentNumber
    FROM ShipmentData

  2. #2
    Join Date
    Dec 2009
    Posts
    15
    Note: I want to UPDATE the field "ShipmentNumber" in the ShipmentData table. Thanks!

  3. #3
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    A syntax you can use is:

    Code:
    UPDATE <table> SET <field> = <something> WHERE <some field> IN ( SELECT ... )
    Have a nice day!

Posting Permissions

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