Hi Everyone,
I have a table where several different records are related to each other. This table is then LEFT OUTER JOINed to another table to add a FirstName and LastName field. For example:
Emp_No, Trans_Type, Value_Type, Value, FirstName, LastName
1234, "New Hire", "First_Name", "Joe", ,
1234, "New Hire", "Last_Name", "Smith", ,
2011, "Change", "Address1", "123 Park St", "Sue", "Jones"
2011, "Change", "City", "Boston", "Sue", "Jones"
2011, "Change", "State", "MA", "Sue", "Jones"
2050, "Change", "Phone", "555-666-7777", "Al", "Walters"
Each Emp_No represents a different group of related records. The "New Hire" records have no FirstName or LastName records to link to.
Here is how I would want the report to look:
Emp_No, Trans_Type, Name
1234, "New Hire", "Smith, Joe"
2011, "Change", "Jones, Sue"
2050, "Change", "Walters, Al"
So all of the related records become a single record. I tried doing this by grouping Emp_No, but then I couldn't figure out how to get the two "New Hire" records onto a single line.
Any suggestions hon how to do this? I apologize for the length of this post. Thanks.
PTW
I have a table where several different records are related to each other. This table is then LEFT OUTER JOINed to another table to add a FirstName and LastName field. For example:
Emp_No, Trans_Type, Value_Type, Value, FirstName, LastName
1234, "New Hire", "First_Name", "Joe", ,
1234, "New Hire", "Last_Name", "Smith", ,
2011, "Change", "Address1", "123 Park St", "Sue", "Jones"
2011, "Change", "City", "Boston", "Sue", "Jones"
2011, "Change", "State", "MA", "Sue", "Jones"
2050, "Change", "Phone", "555-666-7777", "Al", "Walters"
Each Emp_No represents a different group of related records. The "New Hire" records have no FirstName or LastName records to link to.
Here is how I would want the report to look:
Emp_No, Trans_Type, Name
1234, "New Hire", "Smith, Joe"
2011, "Change", "Jones, Sue"
2050, "Change", "Walters, Al"
So all of the related records become a single record. I tried doing this by grouping Emp_No, but then I couldn't figure out how to get the two "New Hire" records onto a single line.
Any suggestions hon how to do this? I apologize for the length of this post. Thanks.
PTW