|
|
Archives of the TeradataForum
Message Posted: Fri, 07 Jun 2002 @ 13:40:13 GMT
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
| |