答案 0 :(得分:2)
而不是FROM tempstockpos WHERE .... AND tempstockpos.batchid = cte.batchid
,您必须在cte
子句中加入FROM
,例如:
FROM tempstockpos, cte WHERE .... AND tempstockpos.batchid = cte.batchid
或者最好是更清洁,更可读:
FROM tempstockpos INNER JOIN cte ON tempstockpos.batchid = cte.batchid WHERE ....
答案 1 :(得分:0)
如果cte
表中没有定义tempstockpos
表,则{{1}}表不会被显示出来。您现在可以显示整个代码。