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?
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)
From novice to tech pro — start learning today.