Jump to content


  • 0
kfv7

Problem with custom report

Question

Hi, I am new to this forum. I have a problem, i have to make a report in SCCM 2007 and I dont know SQL. I have made the following one copying from others ones.

 

declare @Total int

declare @Succeeded int

declare @Failed int

declare @InProgress int

 

select @Succeeded = count (*) from v_ClientDeploymentState where DeploymentEndTime is not NULL

 

select @Failed = count(*) from v_ClientDeploymentState where LastMessageStateID>100 AND LastMessageStateID<400

 

select @InProgress= count(*) from v_ClientDeploymentState where DeploymentEndTime is NULL and LastMessageStateID = 100

 

select @Total = @Failed + @InProgress + @Succeeded

 

if @Total > 0

begin

select @Total as ComputersWithStatus, @Succeeded as DeploySucceeded, @Failed as DeployFailed, @InProgress as DeployInProgress, round(100.0*@Succeeded/@Total,2) as SuccessRate, round(100.0*@Failed/@Total,2) as FailureRate, round(100.0*@InProgress/@Total,2) as InProgressRate

end

 

select FQDN as MachineNameFQDN, NetBiosName as MachineNameNetBios, ClientVersion as ClientVersion, DeploymentBeginTime as DeployStartTime, StateDescription as InProgressDescription, LastMessageParam as DescriptionParam from v_ClientDeploymentState where DeploymentEndTime is NULL and LastMessageStateID = 100

 

select FQDN as MachineNameFQDN, NetBiosName as MachineNameNetBios, ClientVersion as ClientVersion, DeploymentBeginTime as DeployStartTime, StateDescription as FailureDescription, LastMessageParam as DescriptionParam from v_ClientDeploymentState where LastMessageStateID>100 AND LastMessageStateID<400

 

select FQDN as MachineNameFQDN, NetBiosName as MachineNameNetBios, ClientVersion as ClientVersion, DeploymentBeginTime as DeployStartTime, DeploymentEndTime as DeployEndTime, RebootNeeded as RebootNeeded from v_ClientDeploymentState where DeploymentEndTime is not NULL

 

The report shows the status of the SCCM client installation. I have to add a column to the 3 tables that shows the status of each pc. The column have to show the Description of the computer in Active Directory. I try adding the line "select SMS_R_System.description0 as Description", but I get the error "The multi-part identifier "SMS_R_System.description0" could not be bound".

 

Any help would be greatly apreciated.

 

Sorry for my poor english

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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.