1
I need to unite some if's and I’m having difficulties, 
I’ve tried using with the union, but to no avail. 
The query I’m running is:
IF (select count(Estado)
  FROM tbl_1
    where Estado != 'WIP' AND Estado !='on hold') > 0
    BEGIN
    SELECT 'Estado NOK: ', Nome, (Estado), SLA from tbl_1 
    where (Estado != 'WIP' AND Estado !='on hold')
    END
ELSE
    BEGIN
    SELECT 'Estado OK'
    END 
----------
//e o outro if seria:
----------
IF (select count(SLA) 
    FROM tbl_1
        where SLA != '24x7' AND SLA != '10x8') >0
    BEGIN
    SELECT 'Dados NOK: ', Nome, Estado, (SLA) from tbl_1 
    where (SLA != '24x7' AND SLA != '10x8')
    END
ELSE
    BEGIN
    SELECT 'Dados OK' 
    END 
What I need is for these two querys to be joined into one.
Which DBMS? Looks like Sqlserver, I’m sure?
– Jefferson Quesado
That’s right @Jefferson
– J.PP