1
would like to know how I can use a select as a true or false condition within a case or IF:
The query to return true or false is this:
SELECT * FROM Funcionario f WHERE (f.Email IS NULL OR RTRIM(f.Email)='') AND f.FuncionarioID=@funcionarioID
The condition is, if this select returns a True If False line.
Something like this:
IF (SELECT * FROM Funcionario f WHERE (f.Email IS NULL OR RTRIM(f.Email)='') AND f.FuncionarioID=1) THEN END
I need to get the return lines of this select know, I saw that in sql @@ROWCOUNT does this.
– Gustavo Ribeiro
@@ROWCOUNT
It’s none of your business, at least not what’s in the question. I answered what was asked, if your problem is another, need to create a new question.– Maniero