Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 04 Mar 2005 @ 15:28:19 GMT


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


Subj:   Re: Random function with a column value
 
From:   Brian.Jones

Good to know at least that it is not possible - so, I know not to look down that path any longer ;)

My challenge involved different upper limits depending on the record. The final solution I used involved using random numbers 1 through 100 and some concatenation.

Thank you. - Brian


     ,CUST_ZIP5_CD||'_'||TRIM(RANK() OVER (PARTITION BY CUST_ZIP5_CD
           ORDER BY STORE_ID DESC)) AS LKUP_KEY

     ,A.ZIP5_CD||'_'||TRIM((((SEED-1)/(100/STORE_COUNT))+1)) AS LKUP_KEY


     
  <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