Simplify queries

wichtel

New member
Local time
, 20:49
Joined
Apr 7, 2005
Messages
9
Hello, I've got a query which unions two queries. Now, how can I goup the query by "DATUM" and sum up SERIES1 and SERIES2? Is this possible to write as one SQL code?
Thanks, Tom


SELECT AEST_D01.DATUM, AEST_D01.PB AS SERIES1, Null AS SERIES2
FROM AEST_D01
WHERE (AEST_D01.SERIESID)="1003"

UNION SELECT AEST_D01.DATUM, null AS SERIES1, AEST_D01.PB AS SERIES2
FROM AEST_D01
WHERE (AEST_D01.SERIESID)="1009";
 
Create a totals query that uses the union query as its recordsource.
 

Users who are viewing this thread

Back
Top Bottom