360degreehosting
IS-IT--Management
Hello,
We're using ASP to show reports to our affiliates. Right now, we have a report page that has 3 tables on it (there is one html table per query). We would like to have a single query that groups rows by RegTime and shows the value for each of these three queries on the same row.
For example:
Date Unique Invalid Net
07/17/07 130 12 150
...
I hope I've made my question clear enough. Below are the actual queries that we're currently using.
I appreciate any help offered.
Warmest Regards,
Steve
We're using ASP to show reports to our affiliates. Right now, we have a report page that has 3 tables on it (there is one html table per query). We would like to have a single query that groups rows by RegTime and shows the value for each of these three queries on the same row.
For example:
Date Unique Invalid Net
07/17/07 130 12 150
...
I hope I've made my question clear enough. Below are the actual queries that we're currently using.
I appreciate any help offered.
Warmest Regards,
Steve
Code:
SELECT 'Unique' = Count(*), 'UniqueDate' = RegTime FROM Master WHERE Affiliate = 'sb1'AND UniquePhone = 'y' AND onnetmatch = 'y' GROUP BY RegTime Order by RegTime DESC
SELECT 'Invalid' = Count(*), 'InvalidDate' = RegTime FROM Master WHERE Affiliate = 'sb1' AND UniquePhone = 'y' and onnetmatch = 'y' AND status = '8' GROUP BY RegTime Order by RegTime DESC
SELECT 'Net' = Count(*), 'NetDate' = RegTime FROM Master WHERE Affiliate = 'sb1' AND UniquePhone = 'y' and onnetmatch = 'y' AND status != '8' GROUP BY RegTime Order by RegTime DESC