W D
asked on
Coalesce returning NULL if arguments not found
Hi there,
If all arguments are NULL, does COALESCE return NULL in Oracle?
If all arguments are NULL, does COALESCE return NULL in Oracle?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just for grins, I tested more nulls.
it works up to 65535 null inputs ( returning NULL) at 65536 or more you'll get an
ORA-00939 error which isn't documented in the Error Messages book, but the text is pretty clear "too many arguments for function"
it works up to 65535 null inputs ( returning NULL) at 65536 or more you'll get an
ORA-00939 error which isn't documented in the Error Messages book, but the text is pretty clear "too many arguments for function"
I'm surprised you were able to test that many since, I think, the decode and case arguments are limited to 255. For more grins, I wonder if the coalesce statements could be nested like case statements to manage more arguments.
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions030.htm#i1001341