cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hillchris0523
Engaged Sweeper II
Hello I am trying to show a report of two different applications: Shortel, Inc. and Microsoft Office 2007. What statement would best show the two? Here is what I have so far:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblADComputers.Description As ADDescription,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblSoftwareUni.SoftwarePublisher Like '%ShoreTel, Inc.%' And
tblComputersystem.Domainrole < 2
Order By tblAssets.AssetName,
Software
1 ACCEPTED SOLUTION
hillchris0523
Engaged Sweeper II
Support sent me this, which is exactly what was needed!

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblADComputers.Description As ADDescription,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where (tblSoftwareUni.softwareName Like '%ShoreTel%' Or
tblSoftwareUni.softwareName Like '%Microsoft Office%2007%') And
tblComputersystem.Domainrole < 2
Order By tblAssets.AssetName,
Software

View solution in original post

1 REPLY 1
hillchris0523
Engaged Sweeper II
Support sent me this, which is exactly what was needed!

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblADComputers.Description As ADDescription,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where (tblSoftwareUni.softwareName Like '%ShoreTel%' Or
tblSoftwareUni.softwareName Like '%Microsoft Office%2007%') And
tblComputersystem.Domainrole < 2
Order By tblAssets.AssetName,
Software