Hi

How can I to do a Pivot Table from a Table:

I have this SELECT

select pk,qtd_used,qtd_cons, cod from mytable
PK qtd_used qtd_cons cod
726 300,2500 1 1
726 400,2500 10 2
726 78,3600 20 3
726 30,0000 40 4
726 40,0000 50 5

I need return all in only row through PK, look below


pk qtd_cons1 qtd_used1 qtd_cons2 qtd_used2 qtd_cons3 qtd_used3 qtd_cons4 qtd_used4 qtd_cons5 qtd_used5
726 1 300,25 10 400,25 20 78,360 40 30,000 50 40