I need some help writing an SQL query. I am not sure how to put it in words so the best way for me to show you what I want is with an example. (I am using Oracle 10)
I have 2 tables:
Employees (2 fields): e_id e_name 1 Joe 2 Tom 3 Fred Duties (2 fields) e_id e_duty 1 'Clean Floor' 1 'Paint Walls' 2 'Lawn care' 3 'Walk Dog' 3 'Paint Fence' 3 'Cook Dinner' The results that I'm trying to get follows:
Joe 'Clean Floor' 'Paint Walls' Tom 'Lawn Care' Fred 'Walk Dog' 'Paint Fence' 'Cook Dinner' How can I write a query to get the desired results? Also if there is a name for this type of query, please let me know. I'm sure someone out there has already done things like this before, but I just didn't know what it was called thus not knowing what to search for.