Hi Gerffson,
                 In my opinion it could be done by following logic:-


Select Name from* table_name*
Union all
Select Quantity from *table_name*


On Fri, Apr 12, 2013 at 11:17 PM, Michael Moore <michaeljmo...@gmail.com>wrote:

> Actually I like this one much better except for the fact that the author
> uses "count (1)" in his example; a practice that I deplore.
> http://www.oracle.com/technetwork/articles/sql/11g-pivot-097235.html
>
>
>
> On Fri, Apr 12, 2013 at 10:39 AM, Michael Moore 
> <michaeljmo...@gmail.com>wrote:
>
>> 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 <gerff...@gmail.com>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 Oracle-PLSQL@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> oracle-plsql-unsubscr...@googlegroups.com
>>> 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 oracle-plsql+unsubscr...@googlegroups.com.
>>> 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 Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> 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 oracle-plsql+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Regards,
Akshay S. Tanksale
Mobile No:-9833382515

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
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 oracle-plsql+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to