cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MHScripts
Engaged Sweeper II
I am trying to make a report that will show the last 100 failed deployments.
The issue is when I run this it just has the same asset listed 100 times.
Wondering what this issue is?
Sorry in advance as I'm sure its something simple I am over looking.




Select Top 100 web50repwindeploymentlogs.AssetID,
web50repwindeploymentlogs.AssetName,
web50repwindeploymentlogs.Domain,
web50repwindeploymentlogs.IPLocation,
web50repwindeploymentlogs.ScanningServer,
web50repwindeploymentlogs.Package,
web50repwindeploymentlogs.LogDate
From tblAssetCustom,
web50repwindeploymentlogs
Where web50repwindeploymentlogs.DeploySuccess = 'No' And tblAssetCustom.State =
1
1 ACCEPTED SOLUTION
endyk
Engaged Sweeper III
I searched the forum for similar scripts and found the script below. Let me know if it helps.

Select Top 1000000 pl.Added As [Log Date],
pl.ServerName,
a.AssetName,
a.AssetID,
p.PackageName As Package,
p.PackageID,
pl.Executor As Executor,
pl.Errorcode As [Return],
pl.LastStepID As [Last Step],
pl.Errormessage As Message,
pl.Version As [Deployer Version]
From tsysPackageLogs pl
Left Outer Join tblAssets a On pl.AssetID = a.AssetID
Join tsysPackages p On pl.PackageID = p.PackageID
--Where pl.ServerName = ''
Order By [Log Date] Desc

View solution in original post

1 REPLY 1
endyk
Engaged Sweeper III
I searched the forum for similar scripts and found the script below. Let me know if it helps.

Select Top 1000000 pl.Added As [Log Date],
pl.ServerName,
a.AssetName,
a.AssetID,
p.PackageName As Package,
p.PackageID,
pl.Executor As Executor,
pl.Errorcode As [Return],
pl.LastStepID As [Last Step],
pl.Errormessage As Message,
pl.Version As [Deployer Version]
From tsysPackageLogs pl
Left Outer Join tblAssets a On pl.AssetID = a.AssetID
Join tsysPackages p On pl.PackageID = p.PackageID
--Where pl.ServerName = ''
Order By [Log Date] Desc