Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TABLE HELP

Status
Not open for further replies.

ISTodd

Technical User
Mar 25, 2004
43
US
I have a problem with a small financial database:

I created a small database to manage a state program.

There are several accounts in the program 14901, 14902, 14905, 14906.

I have several employees. Durring payroll some employees are paid by different accounts. example: Tony may get paid by 14901 (40%) and 14902 (60%). The
percentage is usually fairly constant, even though the amount may change - depending on his hours.

I have a ledger database that keeps track of basic transactions from each account ( I use a look-up table for each account(14901 etc)

IS THERE AN EASY WAY TO LINK AN EMPLOYEE TABLE TO THE TRANSACTION TABLE? THANKS FOR ANY HELP.. Todd

 
Almost impossible to say without knowing what fields exist in the respective tables. Presumably somewhere you have a table that links the EmployeeID to the accounts from which that employee is paid ... otherwise it wouldn't be possible to decide how to allocate the employee's pay to specific accounts.

You may need a construct of the form
Code:
FROM (Employees E INNER JOIN Accounts A
      ON E.EmployeeID = A.EmployeeID)

     INNER JOIN Transactions T
     ON T.Account = A.Account
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top