468,251 Members | 1,353 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,251 developers. It's quick & easy.

Union query for countries table and sales data table

I have a table where users enter the sales forecast for each quarter for each country for each business type. I have another table which is the Country master which only has a country code and country name. Countries that have no sales are ignored. Not even entered as "zero". My problem is that I need to create a standard report with all the countries shown for each quarter for each business type including those that had no sales ( null ). I tried to create a query that uses all records from the country master and the matching records from the Sales forecast but that gives an error . I cannot create a union query using the country master and the sales forecast since the columns in the country master are only two while the sales forecast has many. Is there a solution?
Feb 6 '13 #1
3 1108
12,511 Expert Mod 8TB
Use an outer join. That's as specific as I can get. It would help if you posted the SQL you tried.
Feb 6 '13 #2
904 Expert 512MB
Sounds like you want an Left Outer Join or a Right Outer Join. Show the query you are currently using.

Feb 6 '13 #3
32,053 Expert Mod 16PB
Please check out these links before posting any new questions :
How to ask "good" questions -- READ BEFORE SUBMITTING A QUESTION!.
Before Posting (VBA or SQL) Code.
Feb 7 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Martin Brunner | last post: by
4 posts views Thread by Wally | last post: by
7 posts views Thread by David Freeman | last post: by
6 posts views Thread by Samuel Shulman | last post: by
4 posts views Thread by =?Utf-8?B?SGFucyAtIERpYUdyYXBoSVQgLQ==?= | last post: by
22 posts views Thread by Ubi | last post: by
6 posts views Thread by patrick.waldo | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.