Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 13th, 2007, 06:41 PM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to miamikk
Default Query to change rows into columns and vice versa

I would like to change rows into columns and columns to rows for the query output table

If the query output is like shown in the table below (including the column names in the first row).

A B C D E
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
a3 b3 c3 d3 e3
a4 b4 c4 d4 e4
a5 b5 c5 d5 e5

The table needs to be converted to (the rows become columns and columns become rows).

A a1 a2 a3 a4 a5
B b1 b2 b3 b4 b5
C c1 c2 c3 c4 c5
D d1 d2 d3 d4 d5
E e1 e2 e3 e4 e5


Thanks
KK



Similar Threads
Thread Thread Starter Forum Replies Last Post
String to attribute and vice versa Pankaj C XSLT 5 February 13th, 2008 06:42 AM
Numbers to words and vice versa? code_lover SQL Language 0 January 7th, 2007 04:50 PM
Word to XML and vice versa using C# asp.net veeruu ASP.NET 1.0 and 1.1 Professional 2 July 21st, 2006 07:41 PM
passing php variable to javascript and vice versa onmcv Beginning PHP 0 March 24th, 2005 01:00 PM
converting c/c++ programs into vb.net vice versa viper063 VB.NET 2002/2003 Basics 1 October 20th, 2004 05:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.