Page 1 of 1

Cursor with Select Case

PostPosted: Tue May 06, 2014 10:26 pm
by itamar rocha
Hello

I really have a question about cursor,

When I have the select below:

 SELECT A.NUM_ENDOSSO                                     
     ,B.NUM_CONTRATO,                                     
     ,B.NUM_ORI_CONTRATO                                 
     ,CASE WHEN A.IND_TP_ENDOSSO = 1 THEN SUN(B.VLR_P
       REMIO)                                                 
       ELSE 0                                                 
       END                                                   
       AS WS-PREMIO-COB


And I want to declare the cursor, how can I declare these cursor, because I never had used select case in a cursor?

Thank you