Results 1 to 7 of 7
  1. #1
    SealM is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    40

    Append Query Only Returns ZERO 0 rows

    Well I'm at it again with a new little project for someone. This is a simple database, with easy design. The focus on this database for my boss is the ease of use. I've automated an IMPORT process from a CSV file, but once the data is imported, I need to automate the updating of the data into a new table. I've done this with an append query. The problem is, however, that the append query doesn't return an error, but won't update any records either. I've been all over the forums, and checked the differences between the two tables, and tried to eliminate keys from both tables, but the data still won't update.

    I've attached the database, since that's going to be the easiest way for someone to find the problem. It's probably something simple, but after hours, I'm just too frustrated to see the solution I guess.

    I'm trying to append all records from the "new_import" table into the "tbl_employee_info" table. Every time I run the query (currently the query is named qry08_import_new_import_INTO_tbl_employee_info) it gives me the message "You are about to append 0 row(s)." Whatever I do, I cannot get it to update a single record from the original table to another.



    Can someone help pretty please? Thanks!!
    Mike

    edit: I will attach the database in a new post down below... had to copy the tables and the query into a new database to reduce the file size.
    Last edited by SealM; 02-28-2013 at 09:05 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Do you want to UPDATE existing records or APPEND new records or both?
    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.

  3. #3
    SealM is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    40
    I want to append all records from the "new_import" table into the "tbl_employee_info" table.
    The field names are all changed from one to another, but I have had no success getting even ONE record to ever append over...

  4. #4
    SealM is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    40

    Database as attached

    I finally got the database size down so I can attach it here. mike.zip

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Open the APPEND query in design or SQL view. Remove tbl_employee_info but not the fields from the AppendTo row. Save the query. Run the query.
    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.

  6. #6
    SealM is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    40
    Unreal. This was SUCH an easy solution. I took the tbl_employee_info out of the very last line and it works fine. I built this query without TOUCHING SQL, and it never worked! Why on Earth would the Design view that helped me make this query give me a failed query design! Arghh..
    Well, another lesson learned. Thanks for the help, June7. I give you props and close this as solved!

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    The query designer is usually helpful for building queries but when subqueries are involved, sometimes have to get hands dirty and just type/edit the SQL. As a for instance, UNION queries can't be built with the designer at all, must be in the SQL View window.
    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. Query returns ro results
    By MichealShinn in forum Queries
    Replies: 5
    Last Post: 02-21-2012, 01:24 PM
  2. Replies: 0
    Last Post: 02-09-2012, 05:43 PM
  3. Replies: 1
    Last Post: 10-06-2011, 08:37 AM
  4. Replies: 7
    Last Post: 07-21-2011, 01:01 PM
  5. Query returns duplicates
    By RobRay in forum Queries
    Replies: 3
    Last Post: 10-26-2010, 01:38 PM

Tags for this Thread

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