Cursor with Select Case



IBM's flagship relational database management system

Cursor with Select Case

Postby itamar rocha » Tue May 06, 2014 10:26 pm

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
itamar rocha
 
Posts: 41
Joined: Mon Nov 11, 2013 8:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cursor with Select Case

 

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post