E
elena
Hi, All
I have 2 crosstab queries, which output the same result, the difference
between them is tables (identical tables with the same name fields).
crosstab 1:
TRANSFORM Sum(LookUp1.fld3) AS SumOffld3
SELECT LookUp1.LongName
FROM LookUp1
GROUP BY LookUp1.LongName
PIVOT Format([fld2],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
crosstab 2:
TRANSFORM Sum(LookUp2.fld3) AS SumOffld3
SELECT LookUp2.LongName
FROM LookUp2
GROUP BY LookUp2.LongName
PIVOT Format([fld2],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
output:
Jan Feb Mar Apr .....
Lena 30 20 50 35
How can i merge (UNION) both crosstab in one, but output fields will look
like this "Jan (tab1)" "Jan(tab2)" "Feb(tab1)" "Feb(tab2)".
I need result like
Jan(tab1) Jan(tab2) Feb(tab1) Feb(tab2) .... Mar Apr .....
Lena 30 20 50 35
Is it possible at all?
Please, help
I have 2 crosstab queries, which output the same result, the difference
between them is tables (identical tables with the same name fields).
crosstab 1:
TRANSFORM Sum(LookUp1.fld3) AS SumOffld3
SELECT LookUp1.LongName
FROM LookUp1
GROUP BY LookUp1.LongName
PIVOT Format([fld2],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
crosstab 2:
TRANSFORM Sum(LookUp2.fld3) AS SumOffld3
SELECT LookUp2.LongName
FROM LookUp2
GROUP BY LookUp2.LongName
PIVOT Format([fld2],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
output:
Jan Feb Mar Apr .....
Lena 30 20 50 35
How can i merge (UNION) both crosstab in one, but output fields will look
like this "Jan (tab1)" "Jan(tab2)" "Feb(tab1)" "Feb(tab2)".
I need result like
Jan(tab1) Jan(tab2) Feb(tab1) Feb(tab2) .... Mar Apr .....
Lena 30 20 50 35
Is it possible at all?
Please, help