View Single Post
  #2 (permalink)  
Old 09-08-2006, 08:16 AM
Dimitar
 
Posts: n/a
Default MS SQL answer. Re: query containing entries that begin with same 3 letters as at least one other entry?

[sql]
insert into dups select * from scores where substring(player from 1 for 3) in (select substring(player from 1 for 3) from scores group by substring(player from 1 for 3) having count(*) > 1);
[/sql]
Please, do not hesitate to ask for clarifications if so is needed.
I would be glad to hear back from you whether the above worked or not.

Best Regards,

Dimitar
Reply With Quote