我有一个选择查询来获取结果集,我的查询如下:
SELECT T0."REFID", T0."REFID_NR", T0."ID_POS",
CASE
WHEN T4."REFID" IS NOT NULL
THEN T4."REFID"
END AS "result"
FROM "SYSTEM"."T00_SOFT" T0
LEFT OUTER JOIN
(
SELECT T1."REFID", T1."REFID_NR", T1."ID_POS",T1."ARTIKEL" ,T2."VEHW", T2."VNHW" ,
(((T2."VEHW"*100)/(T2."VNHW"))*((T1."ER_AW"*100)))/(T1."BAS_AW") AS "claims"
FROM "SYSTEM"."T00_SOFT" T1
INNER JOIN "SYSTEM"."T00_EG" T2
ON T1."REFID" = T2."REFID"
AND T1."ORGID_WE" = T2."ORGID"
AND T1."ARTIKEL" = T2."MATNR" ) T4;
当我执行查询时,我收到以下错误:
Could not execute 'SELECT T0."REFID", T0."REFID_NR", T0."ID_POS", CASE WHEN T4."REFID" IS NOT NULL THEN ...' in 42 ms 382 µs .
SAP DBTech JDBC: [257] (at 521): sql syntax error: line 15 col 33 (at pos 521)
这里第 15 行是指最后一行,表示错误存在于T4
. 我没有发现任何遗漏。如果有人可以提出什么问题?
谢谢