Zwei Versuche:
Wenn Auswertung ID-übergreifend gewünscht ist:
SQL-Code:
select
case when (IsTrue + IsFalse) <> 1 then null else
case when IsTrue = 1 then IsTrue else IsFalse end
end as Ergebnis
from (
select Max(IsTrue) as IsTrue, Max(IsFalse) as IsFalse
from (
select distinct
case when myField = true then 1 else 0 end as IsTrue,
case when myField = false then 1 else 0 end as IsFalse
from myTable where ID in (1,2)
)
)
Wenn Auswertung je ID gewünscht ist:
SQL-Code:
select
ID,
case when (IsTrue + IsFalse) <> 1 then null else
case when IsTrue = 1 then IsTrue else IsFalse end
end as Ergebnis
from (
select ID, Max(IsTrue) as IsTrue, Max(IsFalse) as IsFalse
from (
select distinct
ID,
case when myField = true then 1 else 0 end as IsTrue,
case when myField = false then 1 else 0 end as IsFalse
from myTable where ID in (1,2)
) group by ID
)
(nur ungetestet hingedaddelt)