Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> pivot query

pivot query

From: Tomislav Kokoska <tkokoska_at_varteks.com>
Date: Mon, 16 May 2005 13:38:45 +0200
Message-ID: <d6a0pa$8u5$1@ss405.t-com.hr>


I'm using SQL Tools 1.4.1 Beta build 66..

With this tool i be able to rotate grid, so i can see data horizontal and vertical...



Example..
query returns 1 row and 30 columns..listing and printing is defective, so i need to rotate data

select * from real_estate_atribute where id = :id

bind variable id = 15

id        Name        Adress        City                    State 
Floor_Numer        Telephone    ............     Credit                Cost 
Hire
15       Shop        Stereet 1        New York        Usa            5 
1321635    .................   100000 $     10000000$   true

I need to display transpose data through sql query ..How should i write query to see data as follows..

Column                    Atribute
Id                            15
Name                        Shop
Adress                        Steet1
City                            New York
State                            USA
Floor_number                5
Telephone                    21635321
Credit                           1000000$
....etc.....
Cost                        10000000$
Hire                              true
**********************************

i was looking for pivoting query on the internet but i didn't find similar example...So please help Received on Mon May 16 2005 - 06:38:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US