PL/SQL Cursor Returns Null in Number(x) Variable but Works Fine Using NUMBER Without Precision / Scale

(Doc ID 1475336.1)

Last updated on DECEMBER 06, 2016

Applies to:

Oracle Server - Enterprise Edition - Version to [Release 11.1 to 11.2]
Information in this document applies to any platform.


A simple SELECT on a partitioned table returns NULL if the value is fetched using an aggregate function (max) in a NUMBER(x) variable.
Fetching the value in a NUMBER variable without specifying the length works fine.

Please see the following sample:


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms