Hello all--
I have two views.
(1)vGulfStatesWeighted
(2)vSoutheastWeighted
SELECT count(*) FROM vGulfStatesWeighted
yields 1000 records
SELECT count(*) FROM vSoutheastWeighted
yields 1000 records
What I need now is to put these two views back on top of each other using a UNION query, which I would like to store in yet another view.
Problem is that when I issue this statement:
select * from vGulfStatesWeighted
union
select * from vsoutheastWeighted
I only get 1942 rows... I'm baffled. How could this possibly be true?
Each view has a unique column to identify it ('theRegion') once it's back in the new view that brings them together, which the syntax for is specified above (the UNION query), and then if I issue this command on the new view:
select count(*), theRegion from vMasterWeighted where theRegion = 5 or theRegion = 6
group by theRegion
I get this:
971 5
971 6
Can anyone explain this behavior to me? Or better yet, tell me how to get it to act right?
Thank you,
Paul Prewett
I have two views.
(1)vGulfStatesWeighted
(2)vSoutheastWeighted
SELECT count(*) FROM vGulfStatesWeighted
yields 1000 records
SELECT count(*) FROM vSoutheastWeighted
yields 1000 records
What I need now is to put these two views back on top of each other using a UNION query, which I would like to store in yet another view.
Problem is that when I issue this statement:
select * from vGulfStatesWeighted
union
select * from vsoutheastWeighted
I only get 1942 rows... I'm baffled. How could this possibly be true?
Each view has a unique column to identify it ('theRegion') once it's back in the new view that brings them together, which the syntax for is specified above (the UNION query), and then if I issue this command on the new view:
select count(*), theRegion from vMasterWeighted where theRegion = 5 or theRegion = 6
group by theRegion
I get this:
971 5
971 6
Can anyone explain this behavior to me? Or better yet, tell me how to get it to act right?
Thank you,
Paul Prewett

