Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Sep 2002 @ 15:55:02 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Splitting records depending on Qty
 
From:   sreya malladi

HI,

Please help me on this issue. I want to split the records depends up on qty.

this example is Table 1 set table

THIS IS MY INPUT
Itemno     itemname  itemtype   itemqty
1           aaaaaa    C              6
2           BBBBBB    K              3
3           CCCCCC    L              2
4           DDDDDD    M              1

MY OUT SHOULD BE LIKE THIS

Table 2 set table

Itemno     itemname  itemtype       itemqty                     SEQ_NO
1         aaaaaa              C                6                   1
1         aaaaaa              C                6                   2
1         aaaaaa              C                6                   3
1         aaaaaa              C                6                   4
1         aaaaaa              C                6                   5
1         aaaaaa              C                6                   6
2         BBBBBB              K                3                   1
2         BBBBBB              K                3                   2
2         BBBBBB              K                3                   3
3         CCCCCC              L                2                   1
3         CCCCCC              L                2                   2
4         DDDDDD              M                1                   1

I need to done only with sql. Please help me on this


Thanks

Sreya



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023