My Oracle Support Banner

SqlException: Sqlstate(Null) Vendor Code (17110) Using DECODE And An Aggregate Fuction Like SUM With Nulls (Doc ID 391408.1)

Last updated on AUGUST 29, 2023

Applies to:

JDBC - Version 9.2.0.3 and later
Information in this document applies to any platform.

Symptoms

When attempting to use a SUM and DECODE functions in a select statement, it is generating the sql warning
on selecting 10 or more rows.

The select statement is as follows:

select code, SUM(DECODE(code, 1, value)) value
FROM codes
WHERE code <= 10
GROUP BY code

The warning generated is as follows:

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.