select a.rowid,
a.nome as Area,
a.area_id as CodArea,
f.nopessoa as Nome,
f.cdpessoafunc as CodNome,
decode(a.ativo,'S','Sim','N','Não') as Ativo
from funcionarios f, area a,
solicitantes s
where a.responsavel = f.cdpessoafunc
group by a.rowid, a.nome, a.area_id, f.nopessoa, f.cdpessoafunc, a.ativo
order by 2;
* The "requesters" table is not used at all! Just create a Cartesian product!
* To solve the problem, a group BY was placed, to eliminate the Cartiando product
Posted by Rodrigo Nascimento - Partnership
: - D