7 Replies Latest reply: Oct 30, 2012 12:52 PM by Riccardo Pettenuzzo RSS

    Cycle FOR/WHILE/LOOP ETC.

      Hi to everyone...

      I have this problem about loops:

      there is a long string that i have to divide in different parts but i'd like to use a cycle instead of rewriting many times the same code, changing the values in the SUBTRING FUNCTION!

       

      this is my code:

       

      SET Y= 9

      FOR A=1 TO 10

      TABLE_1:

      SELECT SUBSTR(XXX, Y, 15) AS COLUMN_A

      FROM TAB

      LET Y=Y+15

      NEXT

       

       

       

       

       

      I'm glad of receive suggestions!!!

      i'm really new

      thanks to everyone!!