Symptom
Error message when trying to use WITH CTE in SqlHelper.GetList:
There is an error "Incorrect syntax near the keyword 'with'.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Environment
SAP SALES CLOUD CPQ
Reproducing the Issue
Use any CTE, for example WITH in SqlHelper.GetList.
Cause
Limitation of SAP CPQ.
Resolution
CTE is not supported for SqlHelper.Getlist in SAP CPQ.
Keywords
CPQ, SQL, Helper, Getlist, CTE, WITH, script, interface , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Bug Filed
Product
SAP CPQ 2025
SAP Knowledge Base Article - Public