I have this query:
SELECT *
FROM Parent.Table
WHERE Ref_Num IN ('4205' or (SELECT Ref_Num FROM Child.Table WHERE Ref_Num ='234'))
AND Asset_Type IN ('PUMPS','COLL')
This query doesn't work. The subquery returns 53 rows, instead of typing out all the children ref numbers is there a way to put them in the query along with the parent number of '4205'.
Thanks.