Jump to content


Barnekipha

Query based on collection

Recommended Posts

I have created a report which looks like it might be working. I get info from it.

Username (last logged on user), Production year, Serial number, Producer, Model, and memory / disk space.

 

One of the last things remaining: How do I run this on a collection?

 

SELECT distinct
CS.name0 as 'Namen',
substring(CS.UserName0,11,8) as 'User',
Convert (varChar(30), BIOS.ReleaseDate0,102) 'Production Year',
BIOS.SerialNumber0 as 'Serial number',
CS.Manufacturer0 as 'Producer',
CS.Model0 as 'Model',
sum(isnull(RAM.TotalPhysicalMemory0/1024,'0')) as 'Memory MB',
sum(isnull(LDisk.Size0/1024,'0')) as 'Disk Drive GB',
sum(isnull(LDisk.FreeSpace0/1024,'0')) AS 'Free Diskspace'
from
v_GS_COMPUTER_SYSTEM CS right join v_GS_PC_BIOS BIOS on BIOS.ResourceID = CS.ResourceID
right join v_GS_SYSTEM SYS on SYS.ResourceID = CS.ResourceID
right join v_GS_OPERATING_SYSTEM OS on OS.ResourceID = CS.ResourceID
right join v_RA_System_SMSAssignedSites RAA on RAA.ResourceID = CS.ResourceID
right join V_GS_X86_PC_MEMORY RAM on RAM.ResourceID = CS.ResourceID
right join v_GS_Logical_Disk LDisk on LDisk.ResourceID = CS.ResourceID
right join v_GS_Processor CPU on CPU.ResourceID = CS.ResourceID
right join v_GS_SYSTEM_ENCLOSURE SE on SE.ResourceID = CS.ResourceID
where
LDisk.DriveType0 =3
group by
BIOS.ReleaseDate0,
CS.Name0,
CS.domain0,
CS.Username0,
BIOS.SerialNumber0,
SE.SerialNumber0,
CS.Manufacturer0,
CS.Model0,
OS.Caption0,
RAA.SMS_Assigned_Sites0,
RAM.TotalPhysicalMemory0
ORDER BY Convert (varChar(30), BIOS.ReleaseDate0,102) ASC

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

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.