MS Access不支持联接表达式吗? [英] Is the join expression not supported by MS Access?

查看:94
本文介绍了MS Access不支持联接表达式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以向我解释我的查询出了什么问题吗?

Can anyone explain to me what is wrong with my query?

SELECT T2.TIPOPRODUTO
    , T2.PRODUTO
    , T1.ESPESSURA
    , '' AS LARGURA
    , '' AS COMPRIMENTO
    , '' AS [ACABAM REVEST]
    , '' AS [ESPECIF QUALIDADE]
    , T1.CÓDIGORASTREABILIDADE
    , T3.DATA
    , T4.NOMEFANTASIA
    , T7.NOME
    , T5.DT_INICIO_RESERVA
    , T1.PESO
    , T5.DT_FIM_RESERVA
    , '' AS DESTINO
    , T3.OBSERVAÇÃO
    , '' AS [CUSTO TOTAL]
FROM ([TABELA DE PRODUTOS/ESTOQUE] LEFT OUTER JOIN [TABELA DE PRODUTOS] ON ([TABELA DE PRODUTOS/ESTOQUE].PRODUTO=[TABELA DE PRODUTOS].ID))
, [TABELA DE PRODUTOS/ESTOQUE ] AS T1
    , [TABELA DE PRODUTOS] AS T2
    , [TABELA DE MOVIMENTAÇÃO DE ESTOQUE] AS T3
    , [TABELA DE FORNECEDORES] AS T4
    , RESERVAS_PRODUTOS_ESTOQUE AS T5
, [TABELA DE MOVIMENTAÇÃO DE PRODUTOS/ESTOQUE] AS T6
    , [TABELA DE USUÁRIOS] AS T7
    , [TABELA DE PEDIDOS DE COMPRA] AS T8
WHERE (((T1.Produto)=[T2].[ID]) 
    AND ((T1.ID)=[T5].[ID_PRODUTO_ESTOQUE]) 
    AND ((T5.id_vendedor)=[T7].[ID]) 
    AND ((T3.ID)=[T6].[ID]) 
    AND ((T2.ID)=[T6].[PRODUTO]) 
    AND ((T4.ID)=[T8].[FORNECEDOR]) 
    AND ((T8.Comprador)=[T7].[ID]));

我最好的猜测是它在此行失败:

My best guess is it fails on this line:

([TABELA DE PRODUTOS/ESTOQUE] LEFT OUTER JOIN [TABELA DE PRODUTOS] ON ([TABELA DE PRODUTOS/ESTOQUE].PRODUTO=[TABELA DE PRODUTOS].ID))

推荐答案

您正在将join语句与"classical joins"(在where语句中带条件的表的逗号分隔列表)混合使用,但我认为这是不允许的.

You are mixing a join statement with "classical joins" (a comma separated list of tables with conditions in the where statement), which I believe is not allowed.

将查询更改为仅使用join语句.在Access中,您必须以这种方式使用括号将连接配对:

Change the query to use only join statements. In Access you have to pair the joins using parentheses, in this manner:

from (((t1 join t2 on ...) join t3 on ...) join t4 on ...)

这篇关于MS Access不支持联接表达式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆