SAP Knowledge Base Article - Preview

2233290 - SQL Anywhere give an error with sum


Querying against table with aggregated function, SUM, in SELECT clause gives an error, "Invalid expression near 'sum'".
i.e. SELECT sum(value1-value2) value1, sum(value1+value2) value_2 from test1;



  • SAP SQL Anywhere 17
  • SAP SQL Anywhere 16
  • SAP Sybase SQL Anywhere 12


SAP SQL Anywhere 16.0 ; SAP SQL Anywhere 17.0 ; SAP Sybase SQL Anywhere 12.0


T-SQL, Transact SQL, aggregation, correlation name, integers, insert, column , KBA , BC-SYB-SQA , SQL Anywhere (on premise, on demand) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.