Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help in MS Access query

Author  Topic 

Sunaina Koul
Starting Member

7 Posts

Posted - 2007-09-22 : 06:26:02
Hi,

i need help on one of my issues.

i am working in MS Access.

i created first query as :
QueryABC:=
SELECT DISTINCT [BOT Proforma].[Jan_Net Sales] AS restated
FROM [BOT Proforma], GBMPPL
WHERE (([BOT Proforma].[Product Name]='Reflective') And ([BOT Proforma].[Country]='China') And
([BOT Proforma].Year=2006));

i have second query as :

SELECT DISTINCT [BOT Proforma].[Jan_Net Sales], [BOT Proforma].[Jan_Fact Cost],"i want to include the output of QueryABC in here"

From [BOT Proforma],[GBMPPL]
WHERE (([BOT Proforma].[Product Name]='Reflective') And (GBMPPL.[Sold By Country]='China') And (GBMPPL.[Specified by Country]='Canada') And ([BOT Proforma].Country='Canada') And ([BOT Proforma].Year=2006));

Kindly help.

Thanks & Regards,

Regards,
Sunaina Koul

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-24 : 01:58:30
If query1 always gives a single value, then you can do


SELECT
DISTINCT [BOT Proforma].[Jan_Net Sales], [BOT Proforma].[Jan_Fact Cost],(Query1) as value
From
[BOT Proforma],[GBMPPL]
WHERE
(([BOT Proforma].[Product Name]='Reflective') And (GBMPPL.[Sold By Country]='China') And (GBMPPL.[Specified by Country]='Canada') And ([BOT Proforma].Country='Canada') And ([BOT Proforma].Year=2006));


Also there is seperate forum for ACCESS. You should post all your ACCESS related questions there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -