Quantcast
Channel: THWACK: All Content - All Communities
Viewing all articles
Browse latest Browse all 20202

Dynamic Title for SQL Report?

$
0
0

Hello,

I'm using an uptime report that I pulled from the forums here.  (APM Availability Report - Business Hours) Three, in fact because the maintenance windows are different for each of the three reports.  But by using the Union statement I'm able to get them all on one piece of paper.  I would like to include the date range as the title and haven't figured it out.  If you include them in the select you get thousands of rows which distorts the data.

 

This is the data I would like to include as the title:

     dbo.Date(YEAR(GETDATE()),MONTH(GETDATE())-1,1)

     dbo.Date(YEAR(GETDATE()),MONTH(GETDATE()),1))

 

The basic outline of the report is below:

 

Thanks,

SW

 

(

SELECT 

FROM

WHERE

AND 

GROUP BY

)

UNION ALL

(

SELECT 

FROM

WHERE

AND 

GROUP BY

)

UNION ALL

(

SELECT 

FROM

WHERE

AND 

GROUP BY

)

ORDER BY 1 ASC, 2 ASC;


Viewing all articles
Browse latest Browse all 20202

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>