gpt4 book ai didi

mysql - SQL 错误 - 无法绑定(bind)多部分标识符 "CF.OBJ"

转载 作者:行者123 更新时间:2023-11-30 21:50:14 24 4
gpt4 key购买 nike

我在子查询连接的多部分标识符上收到错误。请帮忙。以下是我写的代码

SELECT CORE.BC_NUMBER AS BC,SEG.BC_NUMBER AS SEGBC,XREF.BC_NUMBER AS XREFBC,CF.OBJ
-- Table CORE
From CORE

-- join seg and core
LEFT JOIN SEG
ON CORE.BC_NUMBER= SEG.BC_NUMBER

-- Join XREF to go from BCNbr to GBC
LEFT JOIN
XREF
ON XREF.BUNL=SEG.BC_NUMBER;

-- GEN JOIN GBC
LEFT JOIN

(SELect JID,P,Obj, JT
From Gen) AS CF

ON CF.Obj=XREF.BC_NUMBER

;

sqlfiddle.com/#!6/29f643/15

最佳答案

看起来你在子查询中有别名;尝试以下操作:

SELECT CORE.BC_NUMBER AS BC,SEG.BC_NUMBER AS SEGBC,XREF.BC_NUMBER AS 

XREFBC,CF.OBJ
-- Table CORE
From CORE

-- join seg and core
LEFT JOIN SEG
ON CORE.BC_NUMBER= SEG.BC_NUMBER

-- Join XREF to go from BCNbr to GBC
LEFT JOIN XREF
ON XREF.BUNL=SEG.BC_NUMBER

-- GEN JOIN GBC
LEFT JOIN (
SELECT JID,P,Obj, JT
From Gen
where JT=28 and P=1
)CF
ON CF.Obj=XREF.BC_NUMBER
;

关于mysql - SQL 错误 - 无法绑定(bind)多部分标识符 "CF.OBJ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47640323/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com