Results 1 to 2 of 2
  1. #1
    Cojack is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010

    Combine insert into syntax

    I know how to insert values into a table and I know how to insert the results of a select statement into a table.
    But is it possible to combine these two methode in MS Access?

    Something like this???
    INSERT INTO Group (groupID, memberID )
    VALUES("1234",(SELECT memberID FROM members WHERE membergroup = '1234'))

    Many thanks

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Yes, you can. just put the value as a select field:
    INSERT INTO Group (groupID, memberID )
    SELECT "1234" as groupID, memberID FROM members WHERE membergroup = '1234'

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. Incomplete Syntax Clause (syntax error)
    By ajetrumpet in forum Programming
    Replies: 4
    Last Post: 09-11-2010, 10:47 AM
  3. SQL INSERT INTO Date Syntax Error
    By tuna in forum Programming
    Replies: 5
    Last Post: 08-10-2010, 06:17 AM
  4. Combine First & Last Name for Combo Box
    By Huddle in forum Access
    Replies: 5
    Last Post: 08-03-2010, 11:37 AM
  5. Syntax Error In Insert Into Statement
    By frankvfox in forum Queries
    Replies: 1
    Last Post: 09-09-2008, 12:35 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 - Senior Forums