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 24th, 2005, 03:26 AM
Authorized User
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default cross tab help

select empid,logdate,basicpay from summ

result is




how can i display it in crsstab like this

empid, 6/7/05,6/22/05,.... <------- this will be the fields

aldave,500,600 <--data

and i will have the query ....... logdate between (param1 and param2)

tnx in advance

Old October 24th, 2005, 01:20 PM
Authorized User
Join Date: Sep 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts

Take a look at http://www.aspfaq.com/show.asp?id=2462

“I sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" -- http://sqlservercode.blogspot.com/
Old October 24th, 2005, 02:56 PM
Friend of Wrox
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts

You don't do what you want in SQL, you do it in your display layer, web or front end application aka display layer (asp/php/vb/dot net/java/etc.). You select it just like you did from SQL and use your other programming language your using to format it that way.

Old October 24th, 2005, 03:26 PM
Friend of Wrox
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts

I agree. I had to crosstab some data in a query recently. What a headache!

Display layer. Yes, its good.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross tab problem sanjivbshinde Crystal Reports 0 August 21st, 2007 11:36 PM
Cross Tab query aware SQL Server 2000 3 June 29th, 2006 04:22 PM
help with cross tab kondapally Crystal Reports 0 August 25th, 2005 09:11 AM
cross tab s_a_ravi BOOK: Professional Crystal Reports for VS.NET 0 February 17th, 2005 06:49 AM
Cross Tab ? abdusalam Crystal Reports 2 July 25th, 2004 11:44 PM

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