473,395 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Oracle Rows to Column Transformation

Hi, I have a table

select * from table

values returning are

login id | status_name | count
===============================
admin open 3
admin closed 5
test inprogress 10
test open 10
test closed 11
user1 closed 5
user1 pending 10

how can i transfer this data from row to column?
I want in this manner

login_id | open | closed | inprogress | pending |
=================================================
admin |3 |5 | 0 | 0
test |10 |10 | 10 | 0
user1 |0 |5 | 0 | 10
Mar 6 '12 #1
1 2193
Rabbit
12,516 Expert Mod 8TB
Starting in oracle 11g, you have access to the pivot clause. For versions before that, you will have to use a series of case statements to segment out your data.
Mar 6 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Diffident | last post by:
Hello All, I need to update a column of Oracle datatype CLOB. I may able to update this column with data upto 32KB but not more than 32KB. I get the following error when I try to update it with...
3
by: Kevin Macdonald | last post by:
I expected Postgresql to use an indexed access method, but in certain cases it is using a sequential scan. Details are below: Table: P1_NRN_ROAD ( sobjid int8 primary key, v int8...
68
by: Martin Joergensen | last post by:
Hi, I have some files which has the following content: 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0
1
by: mm27603 | last post by:
I'm trying to do a simple query of an Oracle 10g database within some vbscript code. <% 'Get protocol information to display in dropdown list %> <!--#include file="dbconnect2.inc"--> <%...
9
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting...
0
by: Shawn | last post by:
I have a query that needs to return a RAW column and convert it to the number that is actually stored in it. In TOAD it returns the number, but in SQLDeveloper or of course vb.net it seems to be...
19
by: Gregor =?UTF-8?B?S292YcSN?= | last post by:
Hi! I'm using DB2 database on one server and ORACLE database on the second one. I want to move some data from ORACLE database to DB2 database and update some columns on ORACLE database so I know...
0
by: jparulan | last post by:
I'm trying to insert a TIF image to ORACLE database 10g using ODP.net and also tried OleDB but I was not successful. Anybody can shed a light? this.TIFFIMG = OCRdir + "\\" +...
4
by: SamBiju | last post by:
I have a query to retrieve few columns from different tables. select distinct sso.sales_order_nb, sso.shipment_id, ssh.tracking_nb, sta_container.box_number, ste.sales_organization_code,...
2
by: TSrinivasan | last post by:
Hi All, I am doing data migration from SQL Server to Oracle using TOAD for the first time. I export data from SQL Server to a notepad file. I import data using TOAD from that notepad...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.