Results 1 to 4 of 4
  1. #1
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    130

    Inner Join SQL

    Trying my first inner join on a multitable query (below).




    Code:
    strRptSQL1 = "SELECT WOTracking.*, Inventory.BoxingType, Inventory.ProcessCode, FROM WOTracking INNER JOIN Inventory ON WOTracking.SKU = Inventory.SKU WHERE ContractCo = '" & Me.cbxContractCo & "' AND  Date_Time >= #" & Format(dt1, "yyyy-mm-dd") & "# AND Date_Time < #" & Format(dt2, "yyyy-mm-dd") & "# ORDER BY OrderNo;"
    I am getting an Error 3141 'SELECT includes a reserved wordor an argument name...'. I got this syntax from another forum, but am not sure exactly what I am looking for.

    Any help would be greatly appreciated.

  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
    For starters, the comma before FROM needs to be deleted.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    130
    Yep. So, I get the donkey award for the day. Thanks you for the good eyes.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo.
    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. INNER JOIN vs LEFT OUTER JOIN
    By shylock in forum Access
    Replies: 3
    Last Post: 10-16-2018, 09:38 AM
  2. Replies: 3
    Last Post: 09-20-2017, 09:50 AM
  3. Replies: 6
    Last Post: 11-19-2013, 01:38 AM
  4. Inner Join works but not Left Join
    By kwooten in forum Queries
    Replies: 1
    Last Post: 12-11-2012, 05:09 PM
  5. Outer Join Nested in Inner Join
    By Stevens7 in forum Queries
    Replies: 2
    Last Post: 10-19-2011, 01:34 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