Informix - Instruccion Case

 
Vista:

Instruccion Case

Publicado por isidroalmaguer (2 intervenciones) el 26/03/2007 18:49:37
Hola buenos dias, sabe alguien si existe alguna instruccion CASE en informix, alguien tiene algun ejemplo...
saludos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Instruccion Case

Publicado por Luis Rivaldo (126 intervenciones) el 27/03/2007 16:22:12
Claro que si existe: Mira este ejemplo donde hay dos case uno dentro del otro.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
case (rpt.print_option)
    when "f"                # file                                             
        case (sortwas)   when "A"  start report I55R_Alist to rpt.output_file
            when "B"  start report I55R_Blist to rpt.output_file
            when "C"  start report I55R_Clist to rpt.output_file
            when "D"  start report I55R_Dlist to rpt.output_file
            when "T"  start report I55R_Tlist to rpt.output_file
            otherwise start report I55R_Clist  to rpt.output_file
        end case
    when "p"                # pipe/printer/screen                              
        case (sortwas)      when "A"  start report I55R_Alist to pipe rpt.cmd
            when "B"  start report I55R_Blist to pipe rpt.cmd
            when "C"  start report I55R_Clist to pipe rpt.cmd
            when "D"  start report I55R_Dlist to pipe rpt.cmd
            when "T"  start report I55R_Tlist to pipe rpt.cmd
            otherwise start report I55R_Clist to pipe rpt.cmd
        end case
end case
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Instruccion Case

Publicado por Isidro Almaguer (2 intervenciones) el 29/03/2007 20:23:20
Gracias Luis me sirvio de mucho...
saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Instruccion Case

Publicado por Edy Amilkar (1 intervención) el 28/05/2014 15:53:43
1
2
3
4
case
     when smdoccmp.tdoc_tipmon= 1  then  "DOLARES"
     when smdoccmp.tdoc_tipmon= 0  then  "QUETZALES "
 end   moneda
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar