MySQL Forums
Forum List  »  Portuguese

Join Varias Tabelas
Posted by: Rodrigo Ap. Olimpio Não Tem
Date: January 12, 2022 08:28AM

Bom Dia!
Estou tentando incluir mais uma tabela no código abaixo mas não estou conseguindo.

Preciso incluir uma tabela chamada: entvenc no código abaixo, esta tabela deverá mostrar o campo TIPODOC e o campo que as duas tabelas (entvenc e nfentra) são DOCUMENTO e NUMERO (entvenc.DOCUMENTO = nfentra.NUMERO)

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

From base_nfetpent
right Join nfentra On base_nfetpent.CODTIPO = nfentra.TIPOENT
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
Join Varias Tabelas
386
January 12, 2022 08:28AM
187
January 14, 2022 09:33AM


Sorry, you can't reply to this topic. It has been closed.

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.