I have a table which holds information on scanned in invoices. Data held includes the invoice number (field1) which is unique and the scanned in date and time(ScanDateTime). I have written the following query to tell me how many invoices are scanned in on a given date range.
select count (field1) as 'Week 1'
where ScanDateTime >= '21 feb 05'
and ScandateTime <= '25 feb 05'
This returns the following result
I'd like to be able to run a query which returns the results for multiple date ranges allowing results similar to those below.
Week 1 Week 2 Week 3
7902 6502 7634
The ultimate aim is to use the query within Microsoft Reports Server (Which I think is a brillant bit of kit). I have multiple querys of this type I'd like to run which is why I'm offering maximum points.