Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 12 Aug 2002 @ 23:29:14 GMT


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


Subj:   Make DISTINCT records and generating sequence number
 
From:   sreya malladi

Hi,

I have a MULTISET table. It has duplicate records. I a want to insert these duplicate records into set table to make these records are DISTINCT records and generating sequence number.

Example

Input multiset table

Column a        column b      column c
Sreya            malladi          1
Sreya            malladi          1
Sreya            malladi          1
Sreya            malladi          1
Sreya            malladi          1
Sreya            malladi          2
Sreya            malladi          3

Output Set table

Column a         column b   column c  column d
Sreya            malladi          1         1
Sreya            malladi          1         2
Sreya            malladi          1         3
Sreya            malladi          1         4
Sreya            malladi          1         5
Sreya            malladi          2         1
Sreya            malladi          3         1

Please help me on this. I need to done this logic with sql only (not with store process and not with any other embedded language)



     
  <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