Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Show Computers by Location with Asset

Updated: 10 Sep 2008 | 1 comment
robertser's picture
+1 1 Vote
Login to vote

Great view to have in your Asset database for reporting the locations your PCs are at. With this view you can easily add a Location column with address to any report you have.

Copy the below code into you Altiris database and save it as a view. I would recommend naming it something easy like vwCSTM_PC_to_Location.

SELECT DISTINCT vc.Guid, vc.Name, vl.Name AS Location, vl.Address, vl.City, vl.State, vl.Zip, vl.Country, vsi.Name AS SiteCode
FROM     dbo.vComputer AS vc INNER JOIN
           dbo.ResourceAssociation AS vcra ON vcra.ParentResourceGuid = vc.Guid INNER JOIN
           dbo.vLocation AS vl ON vcra.ChildResourceGuid = vl._ResourceGuid INNER JOIN
           dbo.ResourceAssociation AS sura ON sura.ParentResourceGuid = vl._ResourceGuid INNER JOIN
           dbo.vSubnet AS vsu ON vsu.Guid = sura.ChildResourceGuid INNER JOIN
           dbo.ResourceAssociation AS sira ON sira.ChildResourceGuid = vsu.Guid INNER JOIN
           dbo.vSite AS vsi ON vsi.Guid = sira.ParentResourceGuid
           

Comments

core000's picture
24
Feb
2009
0 Votes 0
Login to vote

your query returning zero results

Robert, can you verify your query? I do not get any results.

Thanks