SAP Knowledge Base Article - Preview

2450453 - Entry-SQL syntax error: only COUNT(*) or COUNT(DISTINCT...) allowed

Symptom

When executing database calls the following errors appear:

#BC-JAS-PER-SQL#com.sap.sql.jdbc.common.StatementAnalyzerImpl#Guest#0#JTA Transaction : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#Thread[HTTP Worker [@1xxxxxxxx],5,Dedicated_Application_Thread]#Plain##

Exception of type com.sap.sql.log.OpenSQLException caught: The SQL statement "SELECT COUNT("TABLE"."ELEM") FROM "DBNAME" "DB", "XXXXXXXXX" "XX", "XXXXXX" "X" WHERE "XX"."XXXX" = "XX"."XXXXXX" AND "XX"."XXXXXXX" = "X"."XXXX" AND "XX"."XX" = 'VAR_XXX' AND "XX"."KEY_ID" = 'X'" contains the syntax error[s]: - 1:14 - Entry-SQL syntax error: only COUNT(*) or COUNT(DISTINCT...) allowed

Or any SQL statemen which uses SELECT COUNT(TABLE.ELEMENT)


Read more...

Environment

  • Release Independent
  • SAP NetWeaver

Product

SAP NetWeaver 7.0 ; SAP NetWeaver 7.1 ; SAP NetWeaver 7.2 ; SAP NetWeaver 7.3 ; SAP NetWeaver 7.4 ; SAP NetWeaver 7.5 ; SAP enhancement package 1 for SAP NetWeaver 7.0 ; SAP enhancement package 1 for SAP NetWeaver 7.3 ; SAP enhancement package 2 for SAP NetWeaver 7.0 ; SAP enhancement package 3 for SAP NetWeaver 7.0

Keywords

SELECT COUNT DISTINCT contains syntax error Entry-SQLonly COUNT(*) COUNT(DISTINCT...) allowed JTA Transaction , KBA , BC-JAS-PER-SQL , Relational Persistence: Open SQLJ, Open JDBC , Problem

About this page

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

Search for additional results

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