Ajuda em um select.

"Alex Lisboa da Silva" <alexqueio-/1Rj0zDCqbBfyO9Q7EP/[email protected]>
Newsgroups gmane.comp.db.bancosdedados
Message-ID <[email protected]>
Olá pessoal!

Possuo registros da tab3 que gera vários outros registros na tab1, 
porém eu preciso retornar nesse select somente os tab3_idreg que 
possuem 1 registro na tab1 e ignorar os demais. A tab2 é somente para 
amarrar as informações.

select
	tab3_idreg,
	tab3_reg,
	tab3_nome,
	tab1_codigo,
	tab2_descr
from
	tab1,
	tab2,
	tab3
where
	tab1_idtab3 = tab3_idreg and
	tab1_codigo = tab2_id and
	tab1_datai >= to_date ('01/01/2008 00:00:00','dd/mm/yyyy 
hh24:mi:ss') and
	tab1_datai <= to_date ('30/04/2008 23:59:59','dd/mm/yyyy 
hh24:mi:ss') and
	tab3_tipo = 'I'

Obrigado
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.