Reputation: 23
Sorry for the lack of experience in advance.
I have cleansed my diagnostics table and want extract just the rows from followup questions that share the same string in both the AssetType
and RepairType
columns as the diagnostics table.
Is there a statement or join I can do that will bring back those results?
Upvotes: 0
Views: 48
Reputation: 7215
What you can do is perform an inner join from diagnostics to followupquestions:
SELECT * FROM
Diagnostics D
INNER JOIN
FollowupQuestions F
ON
D.AssetType = F.AssetType
AND
D.RepairType = F.RepairType
An inner join will only return rows where the ON condition is met.
Upvotes: 1