1
resposta

QUERY ERRO

onde esta o erro dessa query

SELECT tbproduto.NOME, itens_notas_fiscais.CODIGO_DO_PRODUTO, itens_notas_fiscais.QUANTIDADE, notas_fiscais.MATRICULA, tabela_de_vendedores.NOME FROM tbproduto INNER JOIN itens_notas_fiscais ON tbproduto.CODIGO_DO_PRODUTO = itens_notas_fiscais.CODIGO_DO_PRODUTO inner join notas_fiscais on notas_fiscais.matricula=tabela_de_vendedores.matricula;

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

1 resposta

Emanuel,

A tabela de vendedores do curso tem o campo "NOME":

Diagrama Entidade Relacionamento


SELECT tbproduto.NOME, itens_notas_fiscais.CODIGO_DO_PRODUTO, itens_notas_fiscais.QUANTIDADE, notas_fiscais.MATRICULA, tabela_de_vendedores.NOME 
FROM tbproduto 
INNER JOIN itens_notas_fiscais 
ON tbproduto.CODIGO_DO_PRODUTO = itens_notas_fiscais.CODIGO_DO_PRODUTO 
INNER JOIN notas_fiscais 
ON tbproduto.CODIGO_DO_PRODUTO = itens_notas_fiscais.CODIGO_DO_PRODUTO AND
 notas_fiscais.matricula=tabela_de_vendedores.matricula;

Então você precisa ver no seu banco de dados se o campo nome está lá.

[]'s,

Fabio I.