Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 07 Jun 2002 @ 13:40:13 GMT


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


Subj:   Re: Derived table
 
From:   Shridhar Suvarna

Anomy,

I think the Query below might perform better for you. In my experience I have found that Group by performs better than Distinct.


God Luck.

SELECT
  Table1.Id,
  Dtable.Description
From Table1,
(Select Id, Description
 From Table2
 Group by 1, 2) Dtable
Where
 Table1.Id = Dtable.Id;

OR

SELECT
  Table1.Id,
  Dtable.Description
From Table1
Join
(Select Id, Description
 From Table2
 Group by 1, 2) Dtable
On
 Table1.Id = Dtable.Id;

--Shridhar Suvarna



     
  <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