I can easily create a query in SQL SERVER but the application is in ACCESS. I have the following query:
I run it in SQL SERVER and it runs perfect. I cut and paste into Access and it says the join is not supported. I am overcomplicating it or something in ACCESS because I can't get it to work. No I can't move it into SQL SERVER right now. I would like to, would make everything easier.
Code:
select
P.Product_Number
,PG.Program_Type
,PG.Program_Name 'Grant Name'
,PG.Program_Start_Date 'Grant Start Date'
,PG.Program_End_Date 'Grant End Date'
,PP.Program_Type 'Project Program'
,PP.Program_Name 'Project Name'
,PG.Program_Start_Date 'Project Start Date'
,PG.Program_End_Date 'Project End Date'
from Product_Request P
left join Program PG on PG.Product_Number = P.Product_Number
AND PG.Product_Type = 'G'
left join Program PP on PP.Product_Number = P.Product_Number
AND PP.Program_Type = 'P'