Results 1 to 2 of 2
  1. #1
    cherold is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    82

    Have a query I thought would append certain data from one table to another; what am I missing?

    I'm trying to take one field in a table (LPs), divide it into several fields, and append those fields into another table (Performers). I was hoping this would do it:

    INSERT INTO Performers ( Performers.LastName, Performers.FirstName, Performers.BandName, Performers.OriginalName )


    SELECT DISTINCT getLastname(LPs.[Musician(s)]) , getFirstname(LPs.[Musician(s)]), getBandname(LPs.[Musician(s)]), LPs.[Musician(s)]
    FROM LPs;

    My assumption is if I simply go from SQL View to Datasheet View that it will do whatever is written, and thus would insert data into the table, but apparently I'm wrong. The data in Datasheet View shows exactly what I want, four fields containing parts of the original field properly parsed, but nothing gets added to Performers. What do I need to do to populate Performers?

    Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    From SQL view you'd need to run it with the "!" icon, not view it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 03-10-2014, 11:33 AM
  2. Data in query table missing from report
    By nick.muir2 in forum Reports
    Replies: 2
    Last Post: 07-10-2013, 05:18 PM
  3. Replies: 2
    Last Post: 02-28-2013, 07:00 PM
  4. Replies: 3
    Last Post: 07-23-2011, 09:12 AM
  5. Thought to be simple query
    By tmcrouse in forum Queries
    Replies: 9
    Last Post: 10-01-2010, 10:18 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