Eriston
|
SÃO PAULO SP - BRASIL
|
|
ENUNCIADA !
|
|
|
Postada em 14/06/2004 12:00 hs
Olá amigos, Estou precisando montar uma instrução SQL que faça o seguinte: Selecione registros da tabela funcionarios se ele não estiver na tabela funcionarios demitidos. As tabelas estão relacionadas pelo campo código. Acho que seria +/- assim, fazer um select usando o INNER JOIN pra ir na outra tabela e fazer uma pesquisa na tb demitidos onde for = a nada.. null. Quem poder ajudar eu agradeço. Muito Obrigado!!! Eriston
|
|
|
|
ACG1504
|
PATOS DE MINAS MG - BRASIL
|
|
ENUNCIADA !
|
|
|
Postada em 14/06/2004 12:36 hs
select * from funcionarios f where not exists (select * from func_demitidos d where f.cod_funcionario = d.cod_funcionario)
|
|
|
|
Postada em 14/06/2004 13:53 hs
Muito Obrigado Alexandre, funcionou perfeito. Valew... t+ - Eriston
|
|
|
ACG1504
|
PATOS DE MINAS MG - BRASIL
|
|
ENUNCIADA !
|
|
|
Postada em 14/06/2004 13:58 hs
ok, precisando é so falar... t+
|
|
|