I would like to make a change in this above question.What I would really like to know is how to use 3 fields from a table called original, to find the corresponding lines that are not found in a tbl called posted using the 3 fields as the primary.e.g Originalcard_no ref_no tran_value12 20 12.0012 20 2.0047 01 4.0052 11 2.0004 05 13.0004 20 6.00
e.g Postedcard_no ref_no tran_value12 20 12.0012 21 2.0047 01 4.0052 25 25.0004 20 6.00
e.g Resultcard_no ref_no tran_value12 20 2.0052 11 2.0004 05 13.00
I was thinking that the below query might work not sure thouhselect o.card_no ,o.ref_no ,o.tran_valuefrom OriginalErrorFiles owhere ref_no not in (select ref_no from hopefullyworks where card_no not in (select card_no from hopefullyworks where tran_value not in (select tran_value from hopefullyworks) ) )