main logo
Subject: Re: "walking the db"
Author: Ruslan Zasukhin
Posted: 2001/04/30 07:07:56
 
View Entire Thread
New Search


on 30/4/01 14:21, Frank Schima at macsforever2000 /at/ yahoo .D.O.T com wrote:

>> I can do it in Sybase with the following SQL:
>> Select RecID, ID, NAME From MyTable
>> Where ID in (Select ID From MyTable Group By NAME Having count(*) > 1)
>> Order By NAME
>
> Actually I think I goofed, just to correct this:
>
> Select RecID, ID, NAME From MyTable
> Where NAME in (Select NAME From MyTable Group By NAME Having count(*) > 1)
> Order By NAME

the first form I did like much more.
because in second case it needs to do a lots of string comparison.

may be

Select RecID, ID, NAME From MyTable
Where RecID in
(Select RecID, NAME From MyTable Group By NAME Having count(*) > 1)
Order By NAME

--
Best regards,
Ruslan Zasukhin

-------------------------
Paradigma.

e-mail: ruslan@paradigmasoft.com
web : http://www.paradigmasoft.com

To subscribe to the Valentina mail list
send a letter to valentina-on /at/ lists .D.O.T macserve.net



-------------------------------------------------------------
The Valentina mailing list is brought to you by MacServe.net
For info on lists services, see http://www.macserve.net/lists.html
 
©2001 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->