Solved very simple, but can't figure it out

TipsyWolf

Member
Local time
Today, 03:49
Joined
Mar 20, 2024
Messages
249
hey guys,
how do i call a query to show me only whose ID from Tmain (parent) that doesn't have any records in Tactions. (child)

so i have

1726822647030.png


i tried to set "not equal" but doesn't work.

sql

Code:
SELECT tmain.riskid, Tactions.RiskID, [RiskID]<>[RiskID] AS Expr1
FROM tmain INNER JOIN Tactions ON tmain.RiskID = Tactions.RiskID;
 
SELECT tmain.riskid, Tactions.RiskID FROM tmain LEFT JOIN Tactions ON tmain.RiskID = Tactions.RiskID WHERE ((Tractions.RISKID) IS NULL);


//Edited Jeft with Left
 
Last edited:

Users who are viewing this thread

Back
Top Bottom