Page 1 of 1

Posted: Sun Mar 30, 2014 11:47 pm
by ray.wurlod
There's no Cust_Type_Ind IN ('I', 'N') and no Cust_Type_Ind IS NOT NULL constraint in your SQL query.

Posted: Mon Mar 31, 2014 2:00 pm
by ray.wurlod
Contrast what it does with what it reports. "Returned from job" is not the same as "extracted from source". If you save the scripts you may be able to view the job logs, and if you enable logging of row counts you will get more information about how many rows were extracted from source.

Posted: Mon Mar 31, 2014 6:47 pm
by stuartjvnorton
Agree with Ray.
Don't assume: break it down and look at the numbers, try to understand what it's doing and validate your understanding by changing it up and re-running. Does it agree with what you understand?

Then post your results back. You will learn a lot more about it if you have to explain it to others.


(LOL we don't do homework: we give it out! ;-)

Posted: Mon Mar 31, 2014 7:55 pm
by ray.wurlod
Or, looking at it from the other side, what do you get if you include the rule constraints in the SQL query?

Code: Select all

select count(*) 
from CUST_TYPE C, 
inner join CUST_ALL A on c.cust_key = a.cust_key, 
inner join IW W on a.iw_key = w.iw_key 
where c.Cust_Type_Ind is not null and c.Cust_Type_Ind IN ('I', 'N')