Hello all,
Two queries very similar are giving different row count. Can you please advice. TIA.
select count(*) from FBL.CELL
where exists
( select * from FBL.cell where cmpgn_cd = 'RS15001' and cell_st_dt = '2015-07-14'); Total 426308
But
select count(*) from FBL.cell where cmpgn_cd = 'RS15001' and cell_st_dt = '2015-07-14' Total = 9
I was expecting both the queries to return the same result. The first query is pulling the entire table.
Thanks,
Shalaka
Two queries very similar are giving different row count. Can you please advice. TIA.
select count(*) from FBL.CELL
where exists
( select * from FBL.cell where cmpgn_cd = 'RS15001' and cell_st_dt = '2015-07-14'); Total 426308
But
select count(*) from FBL.cell where cmpgn_cd = 'RS15001' and cell_st_dt = '2015-07-14' Total = 9
I was expecting both the queries to return the same result. The first query is pulling the entire table.
Thanks,
Shalaka