I have a query that looks like this
SELECT ContID, CostCenID, ContName, ContExp, WarExp, ContCost, Descrip
FROM Contracts"
WHERE (ContractExpiration >= '" & BDATE & "' And ContractExpiration <= '" & EDATE & "')
GROUP BY ContractExpiration
ContractExpiration"
The way this works is that is pulls all the date for a certain month and displays the names of the contracts in a calendar with the corresponding day and display all information in that month at the bottom of the page. Works great.
But a change has been requested to display the number of records per day instead of the name. Now I can create a query to count them and I have the above query. but what I cannot do is merge the queries together to one so I would only have to go to the database once or do I have no choice and make 2 queries. I am tring to get a result kind of like this.
Total CostCenID, ConName, ContExp
2 1111 Dell 1/1/03
1 1132 HP 1/3/03
10 1352 xyz 2/10/03
1 3215 abc 3/2/03 AJ
I would lose my head if it wasn't attached.
SELECT ContID, CostCenID, ContName, ContExp, WarExp, ContCost, Descrip
FROM Contracts"
WHERE (ContractExpiration >= '" & BDATE & "' And ContractExpiration <= '" & EDATE & "')
GROUP BY ContractExpiration
ContractExpiration"
The way this works is that is pulls all the date for a certain month and displays the names of the contracts in a calendar with the corresponding day and display all information in that month at the bottom of the page. Works great.
But a change has been requested to display the number of records per day instead of the name. Now I can create a query to count them and I have the above query. but what I cannot do is merge the queries together to one so I would only have to go to the database once or do I have no choice and make 2 queries. I am tring to get a result kind of like this.
Total CostCenID, ConName, ContExp
2 1111 Dell 1/1/03
1 1132 HP 1/3/03
10 1352 xyz 2/10/03
1 3215 abc 3/2/03 AJ
I would lose my head if it wasn't attached.