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
 SQL Server Development (2000)
 Selecting current software version from SMS DB

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-08 : 08:42:02
Dave writes "We have a database that contains individual records of each .exe file on every computer. In some cases, but not all, the same EXE file in installed more once on the same machine (different versions) We need to get a list of only the highest version of each software on each PC. Right now when we do a query we'll get a record for each version of the software on each PC.
Any suggestions?"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2002-07-08 : 10:23:35
3 tasks for you......


1...identify the unique s/w names...from the combined software + version information....
2...inventify s/w version information...and put in a standard format which allows comparisions to be made as to which is 'newer' that the others.....(the exe creation data 'may' be more appropriate for this task)


3...build a correlated sub query on the lines of the following...

select swname, swvers = (select max(version) from table1 b where a.swname = b.swname) from table1 a


HTH

Go to Top of Page
   

- Advertisement -