Re: New-Bie SQL Question...

From: David Sisk <davesisk_at_ipass.net>
Date: 1998/04/04
Message-ID: <VmuV.152$Tf3.3405857_at_news.ipass.net>#1/1


Try using a GROUP BY for multiple distinct columns instead of a DISTINCT.

Regards,
Dave

Bhavesh Gosar wrote in message <6g3iqf$kfc$1_at_engnews2.Eng.Sun.COM>...
>Hi,
>
>I have the foll. table....
>
>F1 F2 N1
>---------- ---------- ----------
>596-2130 401-1993 109
>596-2130 400-0000 109
>596-2130 000-0000 109
>596-2130 401-1993 113
>596-2130 400-0000 113
>596-2130 401-1993 114
>596-2130 111-1111 114
>596-2130 400-0000 114
>
>I need to get the distinct F1, F2 (along with the
>N1) from one of the N1's
>and get distinct F1,F2 from other N1's which
>are different (along with which N1 is belongs to)
>So the Output should look like...
>
>F1 F2 N1
>---------- ---------- ----------
>596-2130 401-1993 109
>596-2130 400-0000 109
>596-2130 000-0000 109
>596-2130 111-1111 114
>
>Is is possible to write in one SQL...??
>
>Rgds,
>Bg
>
>
>
Received on Sat Apr 04 1998 - 00:00:00 CEST

Original text of this message