Hi to all.
I have a view like this:
create view TableALL as
select * from TableA union all select * from TableB
and I have this query:
SELECT MMCODMAG,MMCODART,MMVALMAG,MMQTAMOV
FROM TableALL
WHERE (MMCODMAG IN ('30110','30111','30112')) AND (MMDATREG>='20021201' AND MMDATREG<'20030101')
Well, if I run the query on TableA I find 27065 records, if I run it on TableB I have 18650 records. If I run it on the view TableAll I have only the record from TableA (27065).
Also if I create the view TableB union TableA, I obtain only the records of B (18650).
Thanks
Niccos
I have a view like this:
create view TableALL as
select * from TableA union all select * from TableB
and I have this query:
SELECT MMCODMAG,MMCODART,MMVALMAG,MMQTAMOV
FROM TableALL
WHERE (MMCODMAG IN ('30110','30111','30112')) AND (MMDATREG>='20021201' AND MMDATREG<'20030101')
Well, if I run the query on TableA I find 27065 records, if I run it on TableB I have 18650 records. If I run it on the view TableAll I have only the record from TableA (27065).
Also if I create the view TableB union TableA, I obtain only the records of B (18650).
Thanks
Niccos