[SPCONV-ERR(<NN>)]:[Parsing(<NAME>)](Case..End) Parser failed on a statement restarting to continue with next statement

The automated conversion of case has failed. The parser has continued to the next statement. You must convert manually.The conversion of T-SQL case to PL/SQL decode is decribed below. Oracle introduced a CASE WHEN syntax into PL/SQL in 8.1.6. For more information, see the Oracle8i SQL Reference Release 3 (8.1.7) Part Number A85397-01.

T-SQL

PL/SQL

Select @myvar=sum(
CASE N0 WHEN 1 THEN n1 ELSE n2 END)
from emp

SELECT SUM(DECODE(N0, 1, n1 , n2))

 INTO GSGetAuftragnr.myvar FROM emp;

select @myvar=sum(
CASE WHEN N0 >= C0 AND N0 <> 0 THEN ((N0 - C0) / N0) *
100 ELSE 0 END)
  from emp

SELECT
SUM(
DECODE(1,
DECODE(1,
DECODE(greatest(N0,C0),N0,1,0)/*expr !<|>= expr*/ ,
DECODE(N0,0,0,1)/*expr <>|!= expr*/
,0)/*expr AND expr*/
,( ( N0 - C0 ) / N0 ) * 100,0))
INTO
GSGetAuftragnr.myvar FROM emp;

 Note:

Case is supported through Oracles DECODE.

The Migration Workbench converts case to decode. You must convert each condition in the case statement to a function call. The following syntax are automatically converted by the Migration Workbench:

< <= = <!= !< !, AND, OR, NOT, IS NULL, LIKE

In complex case statements you may want to manually alter the PL/SQL code. To do this, you must first comment out the case statement in the source database procedure, then edit it within Oracle. The Migration Workbench does not convert commented code.

All other functions are not automatically convert. For instance, sub selects within CASE statements are not converted. The second example uses nested decodes and converting tests in to 1 or 0. This allows AND, OR, and NOT to be simulated through decodes. The third argument is ignored. Therefore, formatting in PL/SQL may not match T-SQL formatting.