I am trying to add two columns from a new table into my current query results. Something like this:
In SQL I would do something like:
Select A.Clm1
,A.Clm2
,B.Clm3
,(select udf_number from newTable NT where NT.udf_type_id=1 and NT.id=A.id) as NewColumn1
,(select udf_number from newTable NT where NT.udf_type_id=2 and NT.id=A.id) as NewColumn2
from TableA A inner join TableB B on A.id=B.id inner join newTable NT on NT.id=A.id
or even using case something like
Select A.Clm1
,A.Clm2
,B.Clm3
,(case when NT.udf_type_id=1 then NT.udf_number) as NewColumn1
,(case when NT.udf_type_id=2 then NT.udf_number) as NewColumn2
From..... ...
I tried a few things in access, using sub queries in the from or where part. but didn't get any success. My prb is that I am trying to add two columns based on 1 column in the new table. any help in getting this done in Access?