Actually, it's worse than I thought (after the client makes a "feature
creep") request...

Tables as follows:

Table of Branches
-----------------
Branch_Name
Branch_ID

Table of Employees
-----------------
Employee Name
Employee_ID
Branch_ID - (to tie the employees to their branch)

Table of Contracts
------------------
Contract_Name
Employee_ID - (to tie a specific employee from a branch to a contract)



What I need to find out is for each branch, how many contracts total are
assigned to employees of that branch...

Branch A has 12 Contracts
Branch B has 21 Contracts


ACK!

I can come up with some really convoluted multiple queries that would assign
record counts for each branch/employee to a variable and then add the
variables up or something, but there's got to be a neat compact way of
accomplishing this....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to