Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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
 
Old August 5th, 2006, 01:39 PM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Query problem

I have 4 rows with a single column.
For eg Col1
          A
          B
          C
          D
I want the output as Single Row with A B C D as columns.

Please note that the number 4 here is variable.

Please let me know the optimal SQL Query of doing this.

 
Old August 7th, 2006, 02:20 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Look at this article for a start.
http://www.sqlservercentral.com/colu...tsqlserver.asp






Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Query Problem mike.chary SQL Server 2005 1 September 26th, 2007 06:19 AM
SQL query problem - Need Help Settt Biztalk 0 September 12th, 2005 09:32 AM
Problem in SQL query liorlankri ADO.NET 1 November 8th, 2004 12:37 AM
sql query problem Baby_programmer ASP.NET 1.0 and 1.1 Basics 1 October 14th, 2004 07:13 AM
Sql Query Problem mateenmohd SQL Language 0 January 13th, 2004 05:31 AM





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