Results 1 to 2 of 2
  1. #1
    shani20 is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    6

    Another code error using subquery

    I was attempting to do the following code -

    SELECT First_Name, Last_Name


    FROM Customers
    WHERE CustomerNumber IN
    (SELECT CustomerNumber
    FROM Invoice
    WHERE InvoiceNumber IN
    (SELECT InvoiceNumber
    FROM Invoice_Item
    WHERE Item="Dress Shirt'))
    ORDER BY Last_Name;

    For some reason, I kept getting syntax error starting in (SELECT CustomerNumber - I am trying to figure out why.

  2. #2
    shani20 is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    6
    Never mind - I figured out - had the wrong quote for Dress Shirt.

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

Similar Threads

  1. sql subquery alias join from clause error
    By rwhite7 in forum Access
    Replies: 1
    Last Post: 12-16-2014, 02:06 PM
  2. SubQuery Error
    By aboondocksaint2 in forum Queries
    Replies: 12
    Last Post: 06-16-2014, 11:54 AM
  3. subquery error
    By slimjen in forum Queries
    Replies: 16
    Last Post: 06-10-2014, 01:30 PM
  4. VBA Code Returning Error Run Time Error 3061
    By tgwacker in forum Access
    Replies: 2
    Last Post: 11-24-2013, 11:00 AM
  5. Error in Code
    By Lockrin in forum Programming
    Replies: 3
    Last Post: 02-25-2010, 03:27 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