我的SQL以及上面的错误。我不知道问题是什么了。我做了很多尝试。有人可以帮忙吗?
错误:生成的SELECT语句 语法错误:在列别名或'*'后期望','或'FROM' 要将这些组件添加到数据集,请单击“完成”。
SELECT ALCIE.POLINE.DISTDIV
, ALCIE.POLINE.DISTDEPT
, ALCIE.POLINE.DISTGL
, ALCIE.POLINE.LINENO
, ALCIE.POLINE.ITEM
, ALCIE.POLINE.ITEMDES1
, ALCIE.POLINE.ITEMDES2
, ALCIE.POLINE.PO
, ALCIE.POLINE.PODATE
, ALCIE.POLINE.PURCHUOM
, ALCIE.POLINE.QTYORD
, ALCIE.POLINE.CUMQTYREC
, ALCIE.POLINE.UNITCOST
, ALCIE.POLINE.CUMQTYREC * ALCIE.POLINE.UNITCOST AS EXPR1
, ALCIE.POLINE.RECDATE
, ALCIE.POLINE.VENDOR
, ALCIE.APMASTER.NAME1
, ALCIE.POLINE.STATUS
, ALCIE.POHEADER.STATUS AS EXPR2
, ALCIE.POLINE.STKLOC
, ALCIE.POLINE.LAST_REC_USERID
, ALCIE.POLINE.ITEMDES3
, 'ALCIE_POLINE.PO' || 'ALCIE_POLINE.LINENO' AS EXPR3
, ALCIE.POHEADER.COMMENTS4
FROM ALCIE.POLINE, ALCIE.POHEADER, ALCIE.APMASTER
WHERE ALCIE.POLINE.CO = ALCIE.POHEADER.CO
AND ALCIE.POLINE.PO = ALCIE.POHEADER.PO
AND ALCIE.POHEADER.CO = ALCIE.APMASTER.CO
AND ALCIE.POHEADER.VENDOR = ALCIE.APMASTER.VENDOR
AND (ALCIE.POLINE.CO = 'WSA')
AND (ALCIE.POLINE.PO = :EnterPoNumber)
ORDER BY ALCIE.POLINE.ITEMDES1, ALCIE.POLINE.PO
答案 0 :(得分:0)
试试这个:
SELECT ALCIE.POLINE.DISTDIV, ALCIE.POLINE.DISTDEPT, ALCIE.POLINE.DISTGL, ALCIE.POLINE.LINENO, ALCIE.POLINE.ITEM, ALCIE.POLINE.ITEMDES1, ALCIE.POLINE.ITEMDES2, ALCIE.POLINE.PO, ALCIE.POLINE.PODATE, ALCIE.POLINE.PURCHUOM, ALCIE.POLINE.QTYORD, ALCIE.POLINE.CUMQTYREC, ALCIE.POLINE.UNITCOST, ALCIE.POLINE.CUMQTYREC * ALCIE.POLINE.UNITCOST AS EXPR1, ALCIE.POLINE.RECDATE, ALCIE.POLINE.VENDOR, ALCIE.APMASTER.NAME1, ALCIE.POLINE.STATUS, ALCIE.POHEADER.STATUS AS EXPR2, ALCIE.POLINE.STKLOC, ALCIE.POLINE.LAST_REC_USERID, ALCIE.POLINE.ITEMDES3, (ALCIE.POLINE.PO | ALCIE.POLINE.LINENO) AS EXPR3, ALCIE.POHEADER.COMMENTS4 FROM ALCIE.POLINE, ALCIE.POHEADER, ALCIE.APMASTER WHERE ALCIE.POLINE.CO = ALCIE.POHEADER.CO AND ALCIE.POLINE.PO = ALCIE.POHEADER.PO AND ALCIE.POHEADER.CO = ALCIE.APMASTER.CO AND ALCIE.POHEADER.VENDOR = ALCIE.APMASTER.VENDOR AND (ALCIE.POLINE.CO = 'WSA') AND (ALCIE.POLINE.PO = :EnterPoNumber) ORDER BY ALCIE.POLINE.ITEMDES1, ALCIE.POLINE.PO
答案 1 :(得分:0)
就我而言,问题出在select语句上,您需要按以下方式将所有计算转换为TO_NUMBER
:
尝试一下:
SELECT
TO_NUMBER(TABLE_NAME.COLUMN * TABLE_NAME.COLUMN) AS EXPR1,
TO_NUMBER(TABLE_NAME.COLUMN * 100) AS EXPR2
FROM TABLE_NAME