Results 1 to 4 of 4
  1. #1
    token_remedie is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    13

    why isn't this insert into working?

    trying to get matching data from my query to insert into an existing table, nothing happens it just sits there, any ideas?

    INSERT INTO Transactions ( [Asset Number], [Location Name] )
    SELECT Books.[Asset Number], Books.[Location Name]
    FROM Books INNER JOIN Tabletest ON Books.[Asset Number] = Tabletest.[Asset Number]
    WHERE (((Books.[Asset Number]) Is Not Null));

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you solved this issue, do you care to share your solution with others that read this forum?

  3. #3
    token_remedie is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    13
    of course

    Code:
    INSERT INTO Transactions ( [Asset Number], [Location Code] )
    SELECT Books.[Asset Number], Books.[Location Code]
    FROM Books INNER JOIN Tabletest ON Books.[Asset Number] = Tabletest.[Asset Number]
    GROUP BY Books.[Asset Number], Books.[Location Code]
    HAVING (((Count(Books.[Asset Number]))>1));
    I also had issues where the append was trying to overwrite the primary key, so I deleted the primary keys as they were auto numbers and now I'm working to rebuild the relationships with the asset number as the unique identifier. (which I should have done in the first place)
    Last edited by token_remedie; 09-21-2011 at 09:12 PM. Reason: edit code

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Uhh...I'm sorry but I don't see any difference in the two SQL statements. Am I missing something?

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

Similar Threads

  1. INSERT query: insert new data only
    By drh in forum Access
    Replies: 2
    Last Post: 04-04-2014, 05:31 PM
  2. New insert row
    By khparhami in forum Access
    Replies: 5
    Last Post: 09-06-2010, 10:37 AM
  3. SQL Insert into
    By jamin14 in forum Programming
    Replies: 15
    Last Post: 04-01-2010, 12:35 AM
  4. help with insert
    By jamie in forum Access
    Replies: 1
    Last Post: 11-16-2009, 06:02 AM
  5. Attachment data type INSERT INTO not working
    By LouisLouis in forum Programming
    Replies: 0
    Last Post: 09-27-2009, 02:23 PM

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