View Full Version : simple query not returning all known data


rvolpe
08-05-2009, 07:41 AM
I have created several tables (multiple years) that contain several columns of financial data. The tables are linked by a key and each have the same columns of data.

In attempting to do a query to pull 2 years of one column of data (gross margin), I realized the query was not pulling everything that I know is in the table for gross margin. I did a single year query, and it is still not pulling everything.

I then attempted to query one of the missing records based upon primary key criteria and the gross margin amount. It will not pull it up although I can see it in the table.

Any suggestions on what I have done wrong?

boblarson
08-05-2009, 07:45 AM
1. You probably should not have several tables just to separate by year. But,

2. Since you do, you need a UNION query, not a single query to pull the data.

You would need to do a query on each table you want and join those together in a UNION query and not be joining the tables together.