Results 1 to 2 of 2
  1. #1
    compooper is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    87

    Update Query acting up

    Hi folks!

    Could someone please look over my SQL code for an update query?
    UPDATE tbl1 AS A INNER JOIN tbl1 AS B
    ON A.ID>B.ID
    SET A.[Applicant] = B.[Applicant]


    WHERE A.[Applicant] Is Null AND B.[Applicant] Is Not Null;

    This code essentially repeats the applicant name for all of the blanks below it, until a new name appears.
    So if its:
    Bob Smith
    blank
    blank
    blank
    Jane Smith
    It should update to:
    Bob Smith
    Bob Smith
    Bob Smith
    Bob Smith
    Jane Smith

    The code is working for the majority of the table, but in one RANDOM spot it decides to screw up and starts repeating the same name for more than it really should.
    Maybe its in my code. Please take a look.
    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I've never tried this type of query but think can't be random, has to be a reason. Is it always the same records this happens to? (You are testing this on copy of table?) Attach the data as Access or Excel file, remove confidential info.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Select Query > Update Query > Table Field
    By tuggleport in forum Queries
    Replies: 2
    Last Post: 08-09-2012, 07:04 AM
  2. Update 2 tables with one Update Query
    By Douglasrac in forum Queries
    Replies: 4
    Last Post: 04-14-2011, 08:33 AM
  3. Replies: 2
    Last Post: 01-31-2011, 08:31 AM
  4. Table/Query acting wierd
    By Rick West in forum Queries
    Replies: 2
    Last Post: 03-10-2010, 10:11 AM
  5. Update Query- selective update?
    By stephenaa5 in forum Queries
    Replies: 1
    Last Post: 10-29-2009, 11:15 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