Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/05/2006, 14:32
k3n
 
Fecha de Ingreso: marzo-2006
Mensajes: 56
Antigüedad: 18 años, 2 meses
Puntos: 0
Yo uso el PL/SQL.
Hice lo siguiente:

order by case when ord = 0 then g.vdeger
when ord = 1 then x.cnumcnv
else x.dfeini
end;

Me sale el siguiente error:

Compilation errors for PACKAGE BODY WORKFLOW.PKG_ULTIMUS_PENDIENTESPRUEBA

Error: PLS-00103: Encountered the symbol "CASE" when expecting one of the following:

( - + mod null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current max min prior sql stddev sum variance execute
forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
Line: 39
Text: order by case when ord = 0 then g.vdeger

No sé si algo tenga que ver que este SELECT ya se encuentra dentro de un IF.