View Full Version : pivot query
Tomislav Kokoska
05-16-2005, 03:39 AM
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
FredBear
05-16-2005, 04:48 AM
"Tomislav Kokoska" <tkokoska@varteks.com> a écrit dans le message de
news:d6a0q2$8v6$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
|
Goto Tom Kyte site: http://asktom.oracle.com/
and search for print_table.
Regards
Michel Cadot
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.