Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update query (2003)

    I have a list of unique ids that I want to update some fields for those unique ids in a table. The fields are - "HMIG ind" - I want to change what is in that field to an "N".
    "HMIG Members" - I want to change what is there to a 0 and the fields "HMIG Contracts" - I want to change what is there to a 0. How would I set up the update query since it is only for certain unique ids in that table?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update query (2003)

    How many unique IDs are there in the list? If the number is small, you can set the condition for the ID field to something like this:

    In (13, 21, 34, 55, 89, 144, 233)

    or if the IDs are text values:

    In ("ab", "cde", "fghi", "jklmno", "pqrs", "tuv", "wx")

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update query (2003)

    I did only have 6 unique ids to update so that worked fine. What if I had a list of a 1000 or more unique ids to update. Would I bring in a table of those ids and connect it to the table (one to one) I want to update?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update query (2003)

    Yes, you'd have to create a table containing the unique IDs, add that table to the query and join it to the other table on the ID field.

Posting Permissions

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