Solved very simple, but can't figure it out

TipsyWolf

Member
Local time
Today, 10:27
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:
SELECT tmain.riskid, Tactions.RiskID FROM tmain JEFT JOIN Tactions ON tmain.RiskID = Tactions.RiskID WHERE ((Tractions.RISKID) IS NULL)
1726823581028.png
 
Loving God :(
It is a typo, LEFT not JEFT :-(

There is also a wizard for that
1726824041842.png
 

Users who are viewing this thread

Back
Top Bottom