MySQL Forums
Forum List  »  Portuguese

Re: Join Varias Tabelas
Posted by: Eduardo Murata
Date: January 14, 2022 09:33AM

Tente isso Rodrigo, e altere os campos nome conforme desejado.


Select nfentra.NUMERO As NumeroNF,
nfentra.CNSCADUSU as UsuarioCad,
nfentra.RAZ_SOCIAL As RazaoSocial,
base_nfetpent.DESCRICAO as TipoEntrada,
nfentra.VALORTOT As Valor,
nfentra.FECHAMENTO as Fechamento,
entvenc.nome1,
entvenc.nome2


From base_nfetpent
right Join nfentra On base_nfetpent.CODTIPO = nfentra.TIPOENT
inner join entvenc on entvenc.DOCUMENTO = nfentra.NUMERO
Where FECHAMENTO BETWEEN "2021-12-01" and "2022-01-04" and nfentra.RAZ_SOCIAL like '%ouro verde%'
order by FECHAMENTO

Options: ReplyQuote


Subject
Views
Written By
Posted
135
January 12, 2022 08:28AM
Re: Join Varias Tabelas
50
January 14, 2022 09:33AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.