1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

LOOP in Stored Procedue

Discussion in 'SQL PL/SQL' started by karthik.rajashekaran, May 14, 2015.

  1. karthik.rajashekaran

    karthik.rajashekaran Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Guys

    I need help regarding looping process in stored procedure in oracle
    I have source record as below
    U_1ntitled.png

    I need to get output as below . The CouponDate should be incremented every 6 months i.e. if Coupon_Freq_code is 6_M then 6 months if it 12_M then 12 months
    until CouponDate = mat_date OR CouponDate > sysdate + 10

    Capture2.PNG
     

    Attached Files:

  2. ocprep

    ocprep Forum Advisor

    Messages:
    277
    Likes Received:
    76
    Trophy Points:
    410
    Location:
    Orlando, Florida
    Rows 9-11 in your example will be TRUE for "CouponDate > sysdate + 10" condition, so in the loop you are requesting, they won't appear.