Hi,
Can someone help me with the following query?
select agentnummer as number
,seizoen_03
,seizoen_02
,gidscode_03
,gidscode_02
,aantal_res
,pax
,babies
,gidsreissom
from v_sales_basis02
where gidscode_03 not in (select gidscode from v_sales_basis03
where seizoen = seizoen_03
and agentnummer = number);
When I run this one, it takes about 30 seconds to give me the two records missing. (v_sales_basis02 contains 45 rows, v_sales_basis03 contains 48 rows).
When I leave the agentnummer = number out of the query it takes 2 seconds at most!
Thanks, Lysen
Can someone help me with the following query?
select agentnummer as number
,seizoen_03
,seizoen_02
,gidscode_03
,gidscode_02
,aantal_res
,pax
,babies
,gidsreissom
from v_sales_basis02
where gidscode_03 not in (select gidscode from v_sales_basis03
where seizoen = seizoen_03
and agentnummer = number);
When I run this one, it takes about 30 seconds to give me the two records missing. (v_sales_basis02 contains 45 rows, v_sales_basis03 contains 48 rows).
When I leave the agentnummer = number out of the query it takes 2 seconds at most!
Thanks, Lysen