Lee Attlesey
New Member
- Joined
- May 20, 2002
- Messages
- 22
Hi all
I've created 2 queries to summarise differing data sets on sales and responses so both have the same fields (apart from sales and responses)
I've created a union query to combine the data – code below.
SELECT
[CONTINENT_NAME],[SUB_CONTINENT_NAME],[COUNTRY_NAME],[COUNTRY_REGION],[CENTRE_CNO],[INSTITUTE_NAME],[FINANCIAL_YEAR],[QUARTER_DESCRIPTION],[MONTH_DESCRIPTION],[SESSION_DESCRIPTION],[PRODUCT_GROUP],[EXAM_GROUP],[PRODUCT],[SYLLABUS_CODE]
FROM[Union Query Entry vs CIS - Entry Extract]
UNION ALL SELECT
[CONTINENT_NAME],[SUB_CONTINENT_NAME],[COUNTRY_NAME],[COUNTRY_REGION],[CENTRE_CNO],[INSTITUTE_NAME],[FINANCIAL_YEAR],[QUARTER_DESCRIPTION],[MONTH_DESCRIPTION],[SESSION_DESCRIPTION],[PRODUCT_GROUP],[EXAM_GROUP],[PRODUCT],[SYLLABUS_CODE]
FROM[Union Query Entry vs CIS - CIS Extract]
GROUP BY
[CONTINENT_NAME],[SUB_CONTINENT_NAME],[COUNTRY_NAME],[COUNTRY_REGION],[CENTRE_CNO],[INSTITUTE_NAME],[FINANCIAL_YEAR],[QUARTER_DESCRIPTION],[MONTH_DESCRIPTION],[SESSION_DESCRIPTION],[PRODUCT_GROUP],[EXAM_GROUP],[PRODUCT],[SYLLABUS_CODE];
From this I created a final query which I aim to link a pivot table to which include the data above back with the sales and response columns of data.
Unfortunately this last query when run comes back blank, any advice would be appreciated.
I've created 2 queries to summarise differing data sets on sales and responses so both have the same fields (apart from sales and responses)
I've created a union query to combine the data – code below.
SELECT
[CONTINENT_NAME],[SUB_CONTINENT_NAME],[COUNTRY_NAME],[COUNTRY_REGION],[CENTRE_CNO],[INSTITUTE_NAME],[FINANCIAL_YEAR],[QUARTER_DESCRIPTION],[MONTH_DESCRIPTION],[SESSION_DESCRIPTION],[PRODUCT_GROUP],[EXAM_GROUP],[PRODUCT],[SYLLABUS_CODE]
FROM[Union Query Entry vs CIS - Entry Extract]
UNION ALL SELECT
[CONTINENT_NAME],[SUB_CONTINENT_NAME],[COUNTRY_NAME],[COUNTRY_REGION],[CENTRE_CNO],[INSTITUTE_NAME],[FINANCIAL_YEAR],[QUARTER_DESCRIPTION],[MONTH_DESCRIPTION],[SESSION_DESCRIPTION],[PRODUCT_GROUP],[EXAM_GROUP],[PRODUCT],[SYLLABUS_CODE]
FROM[Union Query Entry vs CIS - CIS Extract]
GROUP BY
[CONTINENT_NAME],[SUB_CONTINENT_NAME],[COUNTRY_NAME],[COUNTRY_REGION],[CENTRE_CNO],[INSTITUTE_NAME],[FINANCIAL_YEAR],[QUARTER_DESCRIPTION],[MONTH_DESCRIPTION],[SESSION_DESCRIPTION],[PRODUCT_GROUP],[EXAM_GROUP],[PRODUCT],[SYLLABUS_CODE];
From this I created a final query which I aim to link a pivot table to which include the data above back with the sales and response columns of data.
Unfortunately this last query when run comes back blank, any advice would be appreciated.