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
,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