Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 24th, 2005, 03:26 AM
Authorized User
 
Join Date: Oct 2004
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default cross tab help

select empid,logdate,basicpay from summ

result is

empid,logdate,basicpay

aldave,6/7/05,500

aldave.6/22/05,600

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



Reply With Quote
  #2 (permalink)  
Old October 24th, 2005, 01:20 PM
Authorized User
 
Join Date: Sep 2005
Location: , , .
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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/
Reply With Quote
  #3 (permalink)  
Old October 24th, 2005, 02:56 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: Orange County, CA, USA.
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.



Reply With Quote
  #4 (permalink)  
Old October 24th, 2005, 03:26 PM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

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

Display layer. Yes, its good.



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:06 AM.


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