What you want is called a pivot query. If you google "oracle sql pivot" you will get a list of resources to explain this. Here is one of them. http://www.dba-oracle.com/t_pivot_examples.htm
On Fri, Apr 12, 2013 at 9:42 AM, Gerffson Junior <[email protected]> wrote: > > Help me please ! > > I have a table with two columns. > > NAME QUANTITY > ---------- ---------- > COL_A 5000 > COL_B 3000 > COL_C 3000 > > I want to transform the rows into columns. > > Below, thats the result that I need > > COL_A COL_B COL_C > --------- ---------- ----------- > 3000 3000 5000 > > If the table have 20 rows, the result must have 20 columns > > Thanks ! > > -- > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Oracle PL/SQL" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en --- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
