I have a question. I think it's not very complex, but I could not solve it.
For example, I have this query:
select * from Paciente where ClinicaID = 3
Your result would be these 3 records:
NomePaciente HoraAtendimento Ativo ClinicaID
Teste2 9:30:00 FALSE 3
Teste3 9:00:00 TRUE 3
Teste4 9:00:00 TRUE 3
I need a query that returns the rows to my system only if all rows are Active = true, so if you have any false rows, will not return any line.
Thus: If all rows are true in my query, return all rows. If it is false, you should not return any.