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 October 23rd, 2004, 06:58 AM
Authorized User
 
Join Date: Dec 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default showing columns as rows

i want to convert my columns into rows as in Matrix report through SQL select statement... my table is

batchno, produced, samples, rejects, finalquantity

AS

batchno, Type , value

thanks in advance



 
Old October 24th, 2004, 08:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

This has been discussed many times on this forum. This is best and easlily done on the frontend, rather than using sql statement. If you have not searched here on this, do a search, you will find a lot of ideas discussed here on that.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old October 28th, 2004, 04:58 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Anantsharma Send a message via Yahoo to Anantsharma
Default

HI,

You can do with SQL query but I feel a need of Grouping as must here.
See "Rotating table in Sql Server" topic in Microsoft site. Example is given there.

Gud Luck

B. Anant





Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting only rows with distinct columns. ThomasSQL SQL Server 2000 4 January 12th, 2006 04:49 PM
Rows 2 Columns kilika Oracle 0 October 14th, 2005 01:16 PM
Columns To Rows alyeng2000 SQL Language 2 March 11th, 2005 03:08 PM
Rows into columns shamsad SQL Language 0 April 7th, 2004 04:39 AM
Rows into columns shamsad Oracle 0 April 7th, 2004 04:38 AM





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