Error "Incorrect parameter count in the call to native function 'DECODE'" when executing a cross-connection query
説明
When running a Cross Connection Query and using the function DECODE() the following error occurs:
"Incorrect parameter count in the call to native function 'DECODE'"
Sample cross query:
SELECT ADDRESS.COUNTRY
, DECODE(ADDRESS.COUNTRY, 'US', 'USA', 'OTHER') AS ChangeCountry
, REGION.REGION_ID
FROM
.
.
.
対策
WORKAROUND:
Use CASE statement in place of DECODE:
*** sample query using CASE
SELECT ADDRESS.COUNTRY,
case COUNTRY
WHEN 'US' THEN 'USA'
ELSE 'OTHER'
END AS ChangeCountry
.
. .
STATUS:
In 4.2 and above, a message will now display to state that DECODE is not supported in cross-queries and to use CASE instead. The latest version can be downloaded here.