Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Select t1.f2, t1.f3, t2.f3
From table1 t1
InnerJoin table2 t2 ON t1.f1 = t2.[fk-f2] AND
t2.f3 <> 'T'
Declare @Table1 Table(f1 Integer, F2 VarChar(10), F3 VarChar(10))
Insert Into @Table1 Values(1,'hey','hoy')
Insert Into @Table1 Values(2,'how','hew')
Insert Into @Table1 Values(3,'hic','hoc')
Declare @Table2 Table(F1 Integer, [T1fk-f2] Integer, F3 VarChar(10))
Insert Into @Table2 Values(1, 1, 'T')
Insert Into @Table2 Values(2, 1, 'Y')
Insert Into @Table2 Values(3, 3, 'Y')
Select T1.*
From @Table1 As T1
Inner Join (
Select [t1fk-f2]
From @Table2
Group By [t1fk-f2]
Having Count(1) = Sum(Case When F3 = 'T' Then 0 Else 1 End)
) As A On T1.F1 = A.[t1fk-f2]