JDCam
asked on
Oracle 10g, SQL Query to count missing rows
Experts,
I need a query to count the number of rows missing between two tables. Pretty simple, this works fine;
I need a query to count the number of rows missing between two tables. Pretty simple, this works fine;
select COUNT(ORD_LINE_NUM)
from E_ORD_D5
where comp_code = 'A1'
and ord_num = 916393
and ORD_LINE_NUM not in (
select ord_line_num from E_ord_d5d2
where comp_code = 'A1'
and ord_num = 916393)
Heres where I am stuck.. the query has 2 parameter fields COMP_CODE and ORD_NUM. Each is currently used twice. My application will only pass the two values one time. How can I add joins to this query so that the parameters are only set once?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER