SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Help - Proximity between words
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mario_2013
Starting Member

Brazil
3 Posts

Posted - 07/03/2013 :  11:33:02  Show Profile  Reply with Quote
Staff have some records that have that kind of duplicity by name and even social register .. How do I return only one?

Example Records:

ID Name
130805 NEWMANN PEREIRA FANUCHI
75539 X NEWMANN PEREIRA FANUCHI

djj55
Constraint Violating Yak Guru

USA
333 Posts

Posted - 07/03/2013 :  13:23:53  Show Profile  Reply with Quote
You could do
select max(id) as id, name from mytable group by name


djj
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000