0
I have 2 tables (function and function_situation). I need to bring in the employees in their proper situations.
The big x of the question is not to bring in some employees who are in some situations (exception).
I have this query, but it keeps displaying the codes I don’t want to appear.
Where am I going wrong?
SELECT DISTINCT
a.funcionario_situacao,
b.funcionariosituacao_title AS title
FROM (".DB_FUNCIONARIO." a
JOIN ".DB_FUNCIONARIOSITUACAO." b ON a.funcionario_situacao = b.funcionariosituacao_id)
WHERE a.funcionario_situacao NOT IN (:excecao)
ORDER BY b.funcionariosituacao_title ASC", "excecao=1,2,3,4,5,14,15"
it would be good to put the structure of the tables, which helps when viewing your problem
– Rovann Linhalis