Hi, I am having a problem with 2 tables I have joined. I am trying to get the data not included in one table comparing to another. from the table A i have all the data i am joining to have all the data extracted but i know i can place a is null or some other command to get the specific field on table B to get what I am leaving out. is this corect?
5/8/2018 9:45:28 PM
Ruben F. Villanueva Viana8 Answers
New AnswerSelect Distinct A.branch, A.item, A.cost, B.component From cost as A right join component as B on a.item = B.item Where A.branch = " x " and A.cost = 07 and A.component is null; my component table has the set of items i want to look in the cost table where the item might not be. I want to pull from that table what items on the component table does not exist. this is not exact code but resembels it
Make it a left join Because this has a right join you are getting everything from table B and anything in A that matches (or null if none) Left means give everything from A and the matching data from B (or null if no match)
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message