
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2015 08:05 PM
Hi all, I am running a modified version of the "Software by computer" report to include several other fields. I was asked to include the number of cores in my report, but when I add the tblProcessors and include the cores, the results almost double. My code is below. Would anyone be willing to take a look and help me modify it so I can have the number of cores listed without having several duplicates.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblOperatingsystem.Caption,
tblAssets.Processor,
tblAssets.NrProcessors,
tblSoftwareUni.SoftwarePublisher As publisher,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion,
tsysOS.Image As icon,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblProcessor.NumberOfCores
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Where (tblSoftwareUni.SoftwarePublisher Like '%Microsoft%' Or
tblSoftwareUni.SoftwarePublisher Like '%Citrix%') And tblAssetCustom.State =
1
Order By tblAssets.AssetName,
software
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2015 11:48 AM
What you are seeing is "normal". TblProcessor has one entry per asset and per processor. SQL displays each table record (e.g. processor) as one line. Machines with multiple processors will have multiple lines.
You can always add a Distinct to your Select statement (Select Distinct...) to have lines that look exactly the same only listed once, but depending on the situation this may give you incorrect results.
You can always add a Distinct to your Select statement (Select Distinct...) to have lines that look exactly the same only listed once, but depending on the situation this may give you incorrect results.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2015 11:48 AM
What you are seeing is "normal". TblProcessor has one entry per asset and per processor. SQL displays each table record (e.g. processor) as one line. Machines with multiple processors will have multiple lines.
You can always add a Distinct to your Select statement (Select Distinct...) to have lines that look exactly the same only listed once, but depending on the situation this may give you incorrect results.
You can always add a Distinct to your Select statement (Select Distinct...) to have lines that look exactly the same only listed once, but depending on the situation this may give you incorrect results.
