YANKRAY
Technical User
- Nov 7, 2003
- 283
CR 10.0
I have the following 3 tables:
Employee_table
Transaction_table
Transaction_table_history
Employee_number is the field that links the 3 tables.
The Transactions are located in both of the Transactions_tables for an Employee in the Employee_table.
Daily Transactions are moved from the Transaction_table to the Transaction_table_history every night.
I am trying to pull Transaction information for an employee from both Transaction tables but need to limit the Transaction_date and Transaction_type fields for my selection.
The Transaction_date is a date range that spans both Transaction_tables and the Transaction_type parameter needs to be set to "Absent-18" (also from both tables).
Example output would look something like:
Employee_Number Transaction_date Transaction_type
000001 04/03/2006 Absent-18
000001 04/06/2006 Absent-18
000002 04/01/2006 Absent-18
This result would be returned because the user selected * All Employees from Employee_table.Employee_number, a date range of 04/01/2006 - 04/06/2006 and the CR select was for the Transaction_type of "Absent-18".
Is there a special join or special selection I should be using?
I have the following 3 tables:
Employee_table
Transaction_table
Transaction_table_history
Employee_number is the field that links the 3 tables.
The Transactions are located in both of the Transactions_tables for an Employee in the Employee_table.
Daily Transactions are moved from the Transaction_table to the Transaction_table_history every night.
I am trying to pull Transaction information for an employee from both Transaction tables but need to limit the Transaction_date and Transaction_type fields for my selection.
The Transaction_date is a date range that spans both Transaction_tables and the Transaction_type parameter needs to be set to "Absent-18" (also from both tables).
Example output would look something like:
Employee_Number Transaction_date Transaction_type
000001 04/03/2006 Absent-18
000001 04/06/2006 Absent-18
000002 04/01/2006 Absent-18
This result would be returned because the user selected * All Employees from Employee_table.Employee_number, a date range of 04/01/2006 - 04/06/2006 and the CR select was for the Transaction_type of "Absent-18".
Is there a special join or special selection I should be using?