title: How to get Numbers in number range by PL-Sql .?
body: <p>here is my serial table.it has more than 1000 records.its with start number and end number.but between numbers not exist.
  i need to add all number [start/between &amp; end numbers] records in another temp table <strong>number by number</strong>
  like below</p>
  
  <p><strong>EXIST TABLE</strong></p>
  
  <pre><code>select concat(CARD_BULK_CODE,start_serial) startserial,concat(CARD_BULK_CODE,end_serial) endserial
  from TSR_BULK_CARD_SERIALS
  </code></pre>
  
  <pre>
  ---------------------------
  STARTSERIAL ENDSERIAL |
  ---------------------------
  18126944    18126946  |
  18141101    18141122  |
  15150722    15150729  |
  19069303    19069317  |
  ---------------------------
  </pre>
  
  <p><strong>REQUIRED TABLE</strong></p>
  
  <pre>
  -----------
  SERIAL_NO | 
  -----------
  18126944    
  18126945    
  18141101    
  18141102    
  ....
  -----------
  </pre>
  
  <p>seem its need pl-sql to implement this.
  please help me to sort out this issue</p>
  
  <p>I tried with below query with the help of dual.
  but its very slow and not yet got results :-) running more than 1 Hour</p>
  
  <pre><code>select distinct concat(t.CARD_BULK_CODE,t.START_SERIAL)+level-1 SERIAL
  from TSR_BULK_CARD_SERIALS t, dual
  connect by level-1&lt;=(concat(t.CARD_BULK_CODE,t.END_SERIAL ))-concat(t.CARD_BULK_CODE,t.START_SERIAL) 
  order by 1
  </code></pre>
  
  <p><strong>EDIT :</strong> </p>
  
  <p>Dear Alen &amp; Dba.i tried with your ones and below error occured.</p>
  
  <pre><code>DECLARE
       l_st NUMBER;
       l_en NUMBER;
  BEGIN
       FOR rec IN (select concat(card_bulk_code, start_serial) startserial,concat(card_bulk_code, end_serial) endserial from tsr_bulk_card_serials)
       LOOP
            l_st := rec.startserial;
            l_en := rec.endserial;
            FOR rec1 IN l_st..l_en
            LOOP
                 INSERT INTO temp(serial_no) values(rec1);
            END LOOP;
       END LOOP;
       COMMIT;
  END;
  Error at line 1
  ORA-01426: numeric overflow
  ORA-06512: at line 9
  
  Script Terminated on line 1.
  </code></pre>