Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Sep 2002 @ 16:55:20 GMT


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


Subj:   Re: Splitting records depending on Qty
 
From:   Buckland

The way that I would do that would be to create a separate table, SEQ_TBL (could be a temporary table), that contains a single column: SEQ_NBR. The data in the table would be a series of sequence numbers up to the highest that are likely to be needed.

Then the query would be something like this

SELECT *
FROM ITEM_TBL A
   ,SEQ_TBL B
WHERE A.ITEMQTY <= B.SEQ_NBR
;

This would give you a product join constrained by the ITEMQTY column. I'm not sure it would be terribly efficient, but for a small job it should work.

Mike Buckland



     
  <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