我收到以下错误:
SQL0104令牌GCOMN无效。有效令牌:要与跳过限制限制的联盟一起使用“跳过等待”(抵消)。
这是我要运行的参数化查询:
SELECT
CASE
WHEN GCOMN = 82 THEN 'S040'
WHEN GCOMN = 2 THEN 'S041'
END as SalesOrgId,
gcusn as BillToId,
gshpn as ShipTo_Mapics,
sapcusn as ShipTo_SAP
FROM YSHPEXT WHERE GCOMN= ?GCOMN AND GCUSN= ?GCUSN AND GSHPN= ?GSHPN
我知道“ GCOMN”是有效的列名。
任何想法都会受到赞赏。
答案 0 :(得分:1)
这是错字吗?-?COLUMN
之类的奇怪表达。
尝试准备以下内容并适当地绑定参数。
SELECT
CASE
WHEN GCOMN = 82 THEN 'S040'
WHEN GCOMN = 2 THEN 'S041'
END as SalesOrgId,
gcusn as BillToId,
gshpn as ShipTo_Mapics,
sapcusn as ShipTo_SAP
FROM YSHPEXT
WHERE GCOMN=? AND GCUSN=? AND GSHPN=?;