Results 1 to 2 of 2
  1. #1
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48

    Inner Join in Union Query

    Dear Friends,



    I have a Union Query Named as “ZVRR_TO_FR” which is working fine (First 2 Rows of SQL Statement).

    Now, I am trying to Inner Join “Planner” Data from FG_PN_LISTS Table with reference ZVRR_TO_FR.Part_Number as reference. I am getting an Syntax Error!

    Kindly Suggest me with proper SQL Statement!

    Code:
    SELECT Part_Number, CRD_Qty, CRD_Date, Format([CRD_Date], "MM.YYYY") AS CRD_Month, "To_Ref." AS Cat FROM TO_ZVRR
    UNION ALL SELECT Part_Number, CRD_Qty*-1, CRD_Date, Format([CRD_Date], "MM.YYYY"), "From_Ref" FROM FR_ZVRR
    INNER JOIN Planner ON FG_PN_LISTS.Part_Number = ZVRR_TO_FR.Part_Number;


    Thanks & Regards,
    Rajeshkumar R

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    AFAIK, that cannot be done in a Union query.

    Create a new query. Add the union query “ZVRR_TO_FR” and the table “Planner” and create the inner join, then add the fields to the query grid.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-09-2017, 12:06 PM
  2. Replies: 4
    Last Post: 01-23-2014, 03:07 PM
  3. Union query to join two crosstab queries
    By racefan91 in forum Queries
    Replies: 5
    Last Post: 09-26-2013, 10:24 AM
  4. Unequal Join or Union?
    By cap.zadi in forum Queries
    Replies: 3
    Last Post: 09-23-2011, 05:57 AM
  5. Union query (or Inner/Outer join?)
    By LilMissAttack in forum Queries
    Replies: 4
    Last Post: 10-23-2010, 12:36 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