In Oracle 9i and 10g how to transpose columns to rows and vice versa?
See http://stackoverflow.com/questions/365238/advice-using-pivot-table-in-oracle