Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.
SELECT CASE WHEN Locations.[Location Name] IS NULL THEN @Location ELSE Locations.[Location Name] END AS Location, Calendar.Dt, CASE WHEN Sales.[Net Sales] IS NULL THEN 0 ELSE Sales.[Net Sales] END AS CurrentSales, LEFT(DATENAME(dw, Calendar.Dt), 3) AS DayName, DATEPART(isowk, Calendar.Dt) AS WeekNum FROM Locations LEFT OUTER JOIN Sales ON Locations.LocationNameOrig = Sales.[Location Name] RIGHT OUTER JOIN Calendar ON Sales.Date = Calendar.Dt WHERE (Locations.[Location Name] = @Location) AND (Calendar.Dt BETWEEN @Begin AND @End) OR (Locations.[Location Name] IS NULL) AND (Calendar.Dt BETWEEN @Begin AND @End) ORDER BY Calendar.Dt
|Benefits of SMB Fileshare||3||63|
|Using SQL Server 2008, how would you modify 2 input parameters to compare them to a date field considering the 2 parms passed in contain the month and year (not the date of the month) ?||1||18|
|MSSQL Speen Degradation||4||10|
|MS SQL Server - Looking to filter rows based on column value||3||11|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!