Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
select cat.[Area], ISNULL([Total Lost Hours],0) AS [Total Lost Hours], ISNULL([Target_Lost_Hours],0) AS [Target_Lost_Hours] from [dbo].[MachineLosses_Area] cat left join (SELECT a.[Area], Isnull(SUM(b.[Total Lost Hours]),0) AS [Total Lost Hours], Isnull(SUM(c.[Target_Lost_Hours]),0) AS [Target_Lost_Hours] FROM [dbo].[MachineLosses_Area] a left outer join [dbo].[MachineLosses_View] b on a.[Area] = b.[Area/Line/Machine] left outer join [dbo].[TargetLosses_View] c on a.[Area] = c.[Area] and b.[Date] = c.[Date] where b.[date] between '01/10/2014' and '20/10/2014' GROUP BY a.[Area] ) sub on cat.[Area] = sub.[Area] ORDER BY [Total Lost Hours] DESC
|MSSQL - Lock Row from reading by other programs||9||39|
|How can I get the entire database script?||7||14|
|SQL View / Qtry||3||12|
|Compare a column in results by values left of decimal||2||7|