hi all,
I have a similar issue posted here, but not exactly the same.
I have a table
emp_dept
(emp_id numeric,
dept_id numeric,
department char(3) )
employees
(emp_id numeric,
emp_name varchar(100)
)
1: 1 employee can belong to 2 different departments
2: I want the output like
emp id, emp_name, (list of all departments the emp_id belongs to )--separated by comma)
this is for displaying, I know we can use a temp table etc to do this, but was looking for any better approach.