special query help

[b][red]This message was edited by ldv2003 at 2006-3-29 12:13:34[/red][/b][hr]
[b][red]This message was edited by ldv2003 at 2006-3-29 11:42:36[/red][/b][hr]
[b][red]This message was edited by ldv2003 at 2006-3-29 11:41:31[/red][/b][hr]
Can someone help me pull up all the fields from the following tables? The user won't budge on the table/relationship setup but I can't them all to pull up. There are many laborer-type employees to a project but only one salesperson per project. Both types are in the Employees table. Salepeople get commission but laborer's commission is NULL. The laborers can also work on many projects. These are stored in Project_ServiceLaborer table w/ 3 PKs. SQL code to join the tables would help a bunch.


Departments: DeptID (string), DeptName (string),
PK: DeptID
Customers: CustID (string), CustName (string), CustContact (string), CustPhone (string),
PK: CustID
Commission: CommClassID (string), CommRate (int),
PK: CommClassID
ServiceLaborers: SrvcLaborerClassID (string), SrvcLaborerClassName (string), SrvcLaborerPayRate (int),
PK: SrvcLaborerClassID
Projects: ProjectNum (string), CustID (string), EmpID (string), ProjStartDate (date), ProjSrvcRate (int),
PK: ProjectNum, FKs: CustID, EmpID
Employees: EmpID (string), CommClassID (string), DeptID (string), EmpLname (string), EmpFname (string),
PK: EmpID, FKs: DeptID, CommClassID
Project_ServiceLaborer: ProjectNum (string), EmpID (string), SrvcLaborerClassID (string),
PKs: ProjectNum, EmpID, SrvcLaborerClassID

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!