Results 1 to 4 of 4
  1. #1
    BigBig5 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    7

    Question Need Help Update/Input Data

    I have two tables that have a list of user info. One table has a status field. I want to update the status of users that is in table 1 but does not match any user in table 2 with "text". How would I do that? I do have an unmatch query of both tables.

  2. #2
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    Ever tried the IN operator? Its very handy in such cases.

    Code:
    UPDATE table_1 SET table_1.status = "text" WHERE NOT table_1.userid IN (SELECT table_2.userid FROM table_2)

  3. #3
    BigBig5 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    7
    Quote Originally Posted by hapm View Post
    Ever tried the IN operator? Its very handy in such cases.

    Code:
    UPDATE table_1 SET table_1.status = "text" WHERE NOT table_1.userid IN (SELECT table_2.userid FROM table_2)
    Is this code you have for SQL?

  4. #4
    BigBig5 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    7
    Quote Originally Posted by hapm View Post
    Ever tried the IN operator? Its very handy in such cases.

    Code:
    UPDATE table_1 SET table_1.status = "text" WHERE NOT table_1.userid IN (SELECT table_2.userid FROM table_2)
    I tried this code and its updating the status of the users that match, but I want it to the users that don't match.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Data Type to input data number
    By TioAdjie in forum Access
    Replies: 5
    Last Post: 02-17-2014, 11:21 AM
  2. Replies: 3
    Last Post: 08-07-2013, 06:03 AM
  3. Update table after input in form
    By orcaa in forum Programming
    Replies: 1
    Last Post: 01-07-2013, 08:57 AM
  4. Replies: 4
    Last Post: 11-10-2011, 03:41 PM
  5. Update two tables from one input form
    By Jeff-H in forum Forms
    Replies: 7
    Last Post: 09-26-2010, 10:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums