jeff5656 Posted December 10, 2010 Share Posted December 10, 2010 I want to run a query on table 1 but exclude records if the field v3 matches the field "mrn" in table 2: I was told to use LEFT OUTER JOIN but this doens't work: Code: SELECT * FROM pts LEFT OUTER JOIN p_list ON pts.v3 = p_list.mrn WHERE pts.v3 IS NULL When I do that nothing is displayed. I don't know if the "IS NULL" term is the problem. Can someone help me with what the php code is to make that query work? Quote Link to comment Share on other sites More sharing options...
OOP Posted December 10, 2010 Share Posted December 10, 2010 What are the keys in both tables? it would be good if you can post the tables structures Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.