Hi there, I've been trying (struggling) to modify the pre-canned report "Computers with low memory (less than or equal to specified MB) in a specific collection". I have very little experience with SQL reporting but am trying to pick up what I can. My first goal with this report was to modify it so that a collection could be specified at runtime and that works. Now I would like to add 2 additional columns to the report for Computer Manufacturer and Computer Model. I am able to get those columns to show up with data in them but the data doesn't match up with the existing columns. These 2 columns seem to be ignoring the collection restriction and are populating with all computers. Here is the query:
SELECT Distinct Manufacturer0,Model0,SYS.Netbios_Name0, SYS.Operating_System_Name_and0, MEM.TotalPhysicalMemory0/1024 As C083 FROM v_GS_SYSTEM_ENCLOSURE, fn_rbac_R_System(@UserSIDs) SYS JOIN fn_rbac_GS_X86_PC_MEMORY(@UserSIDs) MEM on SYS.ResourceID = MEM.ResourceID join v_fullcollectionmembership fcm on fcm.resourceid=sys.resourceid WHERE fcm.collectionid = @COLLID and MEM.TotalPhysicalMemory0/1024 <= @variable
I have bolded in red the additional parts of the query that I would like to populate the 2 new columns with. I know this is incorrect but I am stuck in my troubleshooting. Could some please assist in making this all happen?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi there, I've been trying (struggling) to modify the pre-canned report "Computers with low memory (less than or equal to specified MB) in a specific collection". I have very little experience with SQL reporting but am trying to pick up what I can. My first goal with this report was to modify it so that a collection could be specified at runtime and that works. Now I would like to add 2 additional columns to the report for Computer Manufacturer and Computer Model. I am able to get those columns to show up with data in them but the data doesn't match up with the existing columns. These 2 columns seem to be ignoring the collection restriction and are populating with all computers. Here is the query:
SELECT Distinct Manufacturer0,Model0,SYS.Netbios_Name0, SYS.Operating_System_Name_and0,
MEM.TotalPhysicalMemory0/1024 As C083
FROM v_GS_SYSTEM_ENCLOSURE, fn_rbac_R_System(@UserSIDs) SYS
JOIN fn_rbac_GS_X86_PC_MEMORY(@UserSIDs) MEM on SYS.ResourceID = MEM.ResourceID
join v_fullcollectionmembership fcm on fcm.resourceid=sys.resourceid
WHERE fcm.collectionid = @COLLID and MEM.TotalPhysicalMemory0/1024 <= @variable
I have bolded in red the additional parts of the query that I would like to populate the 2 new columns with. I know this is incorrect but I am stuck in my troubleshooting. Could some please assist in making this all happen?
As always, thanks for your assistance.
Share this post
Link to post
Share on other sites