JoshWithrow
IS-IT--Management
I have a SQL database. I have a scenario I want to pose to anybody who's willing to give this a shot. I'm working with three tables.
Employees
=============
ID
First
Last
Office (same as [Offices.Name])
Offices
=============
ID
Name
PostcardTracking
=============
ID
Agent (same as [Employees.ID])
Office (same as [Offices.Name])
mListQty
I need to display this information (in a web report - don't include details about formatting or anything):
Office | #Employees/Office | Mailing | Total Pieces
This is what needs to happen... I need to display each office name once in the Office field of the web report. Along with each office I need to display the number of employees in the office (each is in the Employees table only one time), the % of Employees that show up in the PostcardTracking table per office, and the total pieces of mail (mListQty) sent from users in that office.
I need to build this information into rows (JOIN) so I can output it to a dataset and write it to screen.
This seems like a trivial task, but my mind has come to a halt and im just totally stumped... please help!!!
Employees
=============
ID
First
Last
Office (same as [Offices.Name])
Offices
=============
ID
Name
PostcardTracking
=============
ID
Agent (same as [Employees.ID])
Office (same as [Offices.Name])
mListQty
I need to display this information (in a web report - don't include details about formatting or anything):
Office | #Employees/Office | Mailing | Total Pieces
This is what needs to happen... I need to display each office name once in the Office field of the web report. Along with each office I need to display the number of employees in the office (each is in the Employees table only one time), the % of Employees that show up in the PostcardTracking table per office, and the total pieces of mail (mListQty) sent from users in that office.
I need to build this information into rows (JOIN) so I can output it to a dataset and write it to screen.
This seems like a trivial task, but my mind has come to a halt and im just totally stumped... please help!!!