‎10-14-2010 11:54 AM
Select Top 1000000
tblSerialnumber.Product,
tblSerialnumber.ProductKey,
Count(tblSerialnumber.SerialID) As Total,
TsysSerials.SerialID
From
dbo.tblComputers
Inner Join web40ActiveComputers On web40ActiveComputers.Computername = dbo.tblComputers.Computername
Inner Join tblSerialnumber On dbo.tblComputers.Computername = tblSerialnumber.Computername
Inner Join TsysSerials On TsysSerials.Product = tblSerialnumber.Product
Group By
tblSerialnumber.Product,
tblSerialnumber.ProductKey,
TsysSerials.SerialID
Having
Count(tblSerialnumber.SerialID) > 1
And TsysSerials.SerialID = 1 Or tblSerialnumber.Product Like 'Microsoft%'
Select Top 1000000
tblSerialnumber.Product,
tblSerialnumber.ProductKey,
Count(tblSerialnumber.SerialID) As Total,
TsysSerials.SerialID
From
dbo.tblComputers
Inner Join web40ActiveComputers On web40ActiveComputers.Computername = dbo.tblComputers.Computername
Inner Join tblSerialnumber On dbo.tblComputers.Computername = tblSerialnumber.Computername
Inner Join TsysSerials On TsysSerials.Product = tblSerialnumber.Product
Group By
tblSerialnumber.Product,
tblSerialnumber.ProductKey,
TsysSerials.SerialID
Having
Count(tblSerialnumber.SerialID) > 1
And (TsysSerials.SerialID = 1 Or tblSerialnumber.Product Like 'Microsoft%')
‎01-10-2011 05:27 PM
Select Top 1000000 dbo.tblComputers.Computername,
dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain, Web40OSName.OSname
As OS, Duplicates.Product, Duplicates.ProductKey, Duplicates.Total,
dbo.tblComputers.Lastseen, Web40OSName.Compimage As icon
From dbo.tblComputers Inner Join
web40ActiveComputers On web40ActiveComputers.Computername =
dbo.tblComputers.Computername Inner Join
tblOperatingsystem On dbo.tblComputers.Computername =
tblOperatingsystem.Computername Inner Join
Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername
Inner Join
tblSerialnumber On dbo.tblComputers.Computername =
tblSerialnumber.Computername Inner Join
(Select Top 1000000 tblSerialnumber.Product, tblSerialnumber.ProductKey,
Count(tblSerialnumber.SerialID) As Total, TsysSerials.SerialID
From dbo.tblComputers Inner Join
web40ActiveComputers On web40ActiveComputers.Computername =
dbo.tblComputers.Computername Inner Join
tblSerialnumber On dbo.tblComputers.Computername =
tblSerialnumber.Computername Inner Join
TsysSerials On TsysSerials.Product = tblSerialnumber.Product
Group By tblSerialnumber.Product, tblSerialnumber.ProductKey,
TsysSerials.SerialID
Having Count(tblSerialnumber.SerialID) > 1 And (TsysSerials.SerialID = 1 Or
tblSerialnumber.Product Like 'Microsoft%')) Duplicates On
Duplicates.ProductKey = tblSerialnumber.ProductKey And Duplicates.Product =
tblSerialnumber.Product
Order By Duplicates.Total Desc, Duplicates.Product, dbo.tblComputers.Computer
‎01-10-2011 12:31 PM
‎01-10-2011 12:38 PM
wpa1160 wrote:
Any updates on that?
The view still contains the wrong WHERE condition. If I add the brackets as suggested in the first post the wrong output is gone...
‎12-20-2010 09:08 AM
‎12-17-2010 02:20 PM
‎12-06-2010 04:50 PM
‎10-25-2010 11:55 AM
Select Top 1000000 dbo.tblComputers.Computername,
dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain, Web40OSName.OSname
As OS, Duplicates.Product, Duplicates.ProductKey, Duplicates.Total,
dbo.tblComputers.Lastseen, Web40OSName.Compimage As icon
From dbo.tblComputers Inner Join
web40ActiveComputers On web40ActiveComputers.Computername =
dbo.tblComputers.Computername Inner Join
tblOperatingsystem On dbo.tblComputers.Computername =
tblOperatingsystem.Computername Inner Join
Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername
Inner Join
tblSerialnumber On dbo.tblComputers.Computername =
tblSerialnumber.Computername Inner Join
(Select Top 1000000 tblSerialnumber.Product, tblSerialnumber.ProductKey,
Count(tblSerialnumber.SerialID) As Total, TsysSerials.SerialID
From dbo.tblComputers Inner Join
web40ActiveComputers On web40ActiveComputers.Computername =
dbo.tblComputers.Computername Inner Join
tblSerialnumber On dbo.tblComputers.Computername =
tblSerialnumber.Computername Inner Join
TsysSerials On TsysSerials.Product = tblSerialnumber.Product
Group By tblSerialnumber.Product, tblSerialnumber.ProductKey,
TsysSerials.SerialID
Having (Count(tblSerialnumber.SerialID) > 1 And TsysSerials.SerialID = 1) Or
(tblSerialnumber.Product Like 'Microsoft%')) Duplicates On
Duplicates.ProductKey = tblSerialnumber.ProductKey And Duplicates.Product =
tblSerialnumber.Product
Order By Duplicates.Total Desc, Duplicates.Product, dbo.tblComputers.Computer
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now