Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 17 Nov 2004 @ 21:14:18 GMT


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


Subj:   Re: CAST instead of CASE
 
From:   Jim Downey

Your Range table would have these values:

     MinValue    MaxValue    RangeName
     500         1000        '500-1,000'
     1001        1500        '1001-1,500'
     1501        2000        '1501-2,000'
     ...
     999501      1000000     '999,501-1,000,000'

You could populate this with SQL

You would then join your data table to this range table to get your RangeName Values.

     Sel   b.RangeName
     From  DataTable a
     Inner Join RangeTable b

     Where a.NumericValue between b.MinValue and b.MaxValue

Perhaps I don't understand what you are trying to do?


Jim

Galaxy Data Warehouse: Competitive Advantage through Business Intelligence ( galaxy.nwie.net/NewGalaxy/ )



     
  <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