Link Query

R

Ranjit kurian

Hi

I have one Union Query which contain only customer Names, when i link this
query to Month Query and Current Query it should give me correct amounts of
that particular months...

Example:
Union Query:
Name
A
B
C
D
E
F

Month Query:
Name JAN FEB
A 5 10
B 6 20
C 7 30

Current Query:
Name April
D 1
D 2
E 3
F 4
F 5

I need a query, so that when i link the Month Query and Current Query with
Union Query the result should be as shown below

Combined Query:
Name JAN FEB April
A 5 10 0
B 6 20 0
C 7 30 0
D 0 0 3
E 0 0 3
F 0 0 9
 
I

Irene

u need to do two query first, there is sum the amount for the current query
and the month query. after that just use the union query.

SELECT [Name], [Month], [SumOfqty]
FROM [q_CurrentQuery]

UNION ALL SELECT [Name], [Month], [SumOfqty]
FROM [q_MonthQuery];

then u can get the result as what u want. hope this answer can help u.
 
R

Ranjit kurian

Hi Irene,

Thanks for the information, but i did not under the sumof concept how to do
it in access please tell

below is your query:
SELECT [Name], [Month], [SumOfqty]
FROM [q_CurrentQuery]

my query:
SELECT [NAME],[APRIL],[Sumof.........????
FROM [q_CurrentQuery]




Irene said:
u need to do two query first, there is sum the amount for the current query
and the month query. after that just use the union query.

SELECT [Name], [Month], [SumOfqty]
FROM [q_CurrentQuery]

UNION ALL SELECT [Name], [Month], [SumOfqty]
FROM [q_MonthQuery];

then u can get the result as what u want. hope this answer can help u.

Ranjit kurian said:
Hi

I have one Union Query which contain only customer Names, when i link this
query to Month Query and Current Query it should give me correct amounts of
that particular months...

Example:
Union Query:
Name
A
B
C
D
E
F

Month Query:
Name JAN FEB
A 5 10
B 6 20
C 7 30

Current Query:
Name April
D 1
D 2
E 3
F 4
F 5

I need a query, so that when i link the Month Query and Current Query with
Union Query the result should be as shown below

Combined Query:
Name JAN FEB April
A 5 10 0
B 6 20 0
C 7 30 0
D 0 0 3
E 0 0 3
F 0 0 9
 
I

Irene

sorry, may i know ur table field? i have estimate that ur jan, feb , april is
in one field which called month. i think u need do like this. then is more
easy. then the nomber u giv that one, i expected is qty. so i was do the
query like tat.

Ranjit kurian said:
Hi Irene,

Thanks for the information, but i did not under the sumof concept how to do
it in access please tell

below is your query:
SELECT [Name], [Month], [SumOfqty]
FROM [q_CurrentQuery]

my query:
SELECT [NAME],[APRIL],[Sumof.........????
FROM [q_CurrentQuery]




Irene said:
u need to do two query first, there is sum the amount for the current query
and the month query. after that just use the union query.

SELECT [Name], [Month], [SumOfqty]
FROM [q_CurrentQuery]

UNION ALL SELECT [Name], [Month], [SumOfqty]
FROM [q_MonthQuery];

then u can get the result as what u want. hope this answer can help u.

Ranjit kurian said:
Hi

I have one Union Query which contain only customer Names, when i link this
query to Month Query and Current Query it should give me correct amounts of
that particular months...

Example:
Union Query:
Name
A
B
C
D
E
F

Month Query:
Name JAN FEB
A 5 10
B 6 20
C 7 30

Current Query:
Name April
D 1
D 2
E 3
F 4
F 5

I need a query, so that when i link the Month Query and Current Query with
Union Query the result should be as shown below

Combined Query:
Name JAN FEB April
A 5 10 0
B 6 20 0
C 7 30 0
D 0 0 3
E 0 0 3
F 0 0 9
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top