I need to build a query which will give me employee id as columns. Since there can be any number of employees in a department, the number of columns is decided at runtime. The output should be as below. A,B,C,D etc. are employee id's
DEPT EMP1 EMP2 EMP3 EMP4 ... EMP(n)
===================================
10 A B C D E(n)
20 P Q R
30 X Y