On 10/27/05, Abhishek <[EMAIL PROTECTED]> wrote:
> I am tryng to write a query which returns me a record like this
<snip>
> I do the query as this:
>
> select callguid , ( select digits from TABEL1 where type='a' ), ( select
> digits from TABEL1 where type='b' ), ( select digits from TABEL1 where
> type='c' ) from TABLE1;
<snip>
> Note that I get the records which i wanted, but I get them duplicated. If I
> use 'distinct' keyword I get the desired result with no duplication. But
> 'distinct' seems to be too expensive.
>
> Is there any better way I can do this without compromising the performance ?

Just add 'LIMIT 1' to the end of the query.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to