hello guys!!!i m having one thread and i have stukkened badly..
i want to fetch data from oracle using sql query ,to transpose rows to column and column into rows..

example:

--------------------------------------------
sno name dept
--------------------------------------------
1 a IT
2 b Management
3 c clerk

want as resultant as this table...


----------------------------------------------------
sno 1 2 3
name a b c
dept IT mngt clerk


i know this would be done through PIVOT
but i am not getting how it would be actually implemented..in code
help would be appriciated.