Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Eliminating Duplicates from a select Statement

Author  Topic 

butlermi_11
Starting Member

10 Posts

Posted - 2002-01-17 : 12:57:55
Gentlemen,

This probably a simple question but here goes, I am trying to create a select statement that returns 3 fields NetBios Name, Application Name and Version Name. Here is the problem some records have an older versions that are being returned.

EX.. Bobspc IE 5.51
Bobspc IE 6.00

How would I get the select to return only the greater of the two versions???

chadmat
The Chadinator

1974 Posts

Posted - 2002-01-17 : 13:02:22
Try this:

SELECT NetBiosName, ApplicationName, Max(VersionName)
FROM MyTable
GROUP BY NetBiosName, ApplicationName

-Chad


Go to Top of Page
   

- Advertisement -