select count(*)
from order_header, order_detail
where order_header.ORDER_NO = order_detail.ORDER_NO
and order_header.ORDER_STATUS = '14'
I have checked and there are 19556 records from the header file whose status = 14 and and there are a total of 96920 records in the detail file. From what I understand, the query above should give me a portion out of the 96920 records whose order_no corresponds to the order_no from the header file whose status = 14. However, when I run the query I get 194178 records. Isn't that impossible or did I miss something?
from order_header, order_detail
where order_header.ORDER_NO = order_detail.ORDER_NO
and order_header.ORDER_STATUS = '14'
I have checked and there are 19556 records from the header file whose status = 14 and and there are a total of 96920 records in the detail file. From what I understand, the query above should give me a portion out of the 96920 records whose order_no corresponds to the order_no from the header file whose status = 14. However, when I run the query I get 194178 records. Isn't that impossible or did I miss something?