Q
Problem solve Get help with specific problems with your technologies, process and projects.

Working around max number of components in DECODE

How do I work around the maximum number of components in DECODE function? I've seen that I can't use more than 255 parameters but I need about 800 parameters... How can I bypass this limit?
That is the limitation of DECODE, even if you use nested DECODE, the maximum number of argument is 255 (that includes both condition and expression). Try using CASE statement in your SQL and see if that solves your problem. CASE is available in SQL starting with 8i and in PL/SQL starting with Oracle 9i.

I personally never used that many parameter in a DECODE statement, so I ran a simulation to confirm my answer. Please try using CASE and see if that resolves your problem.

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close