Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 21 Feb 2007 @ 21:28:55 GMT


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


Subj:   Re: Avoid the Product Join
 
From:   Christie, Jon

A term is something like x = y. You'll find them in the WHERE clause, ON clauses and sometimes, as in your query, in CASE expressions in the select list.

Here's an example of adding a BIND term to your query:

     select sum (case when b.range = 1 then 1 else 0 end)
           ,sum (case when b.range = 2 then 1 else 0 end)
           ,sum (case when b.range = 3 then 1 else 0 end)
     from table_a as a
         ,table_b as b
     where a.duration between b.min_duration and b.max_duration
      and  a.x = b.x;  /*<---- Added BIND term. */


     
  <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