Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Cross Tab Query

Author  Topic 

iamsmahd
Yak Posting Veteran

55 Posts

Posted - 2006-07-04 : 01:57:36
Hi all.

what is a cross tab query and what differences it has with oter normal queries? would you get a sample about it (cross tab and normal form) ?

Thank you very much

sonia

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2006-07-04 : 02:25:01
Hi Sonia,
The main difference with cross-tabs is that there can be a varying number of columns in your query results. Whereas a normal query would look something like this:
Salesman Month Sales
-----------------------------
Tim Mar 06 3243
Tim Apr 06 4234
Tim Jun 06 9232

The cross-tab version might look like this:
Salesman Mar 06 Apr 06 May 06
-------------------------------------------
Tim 3243 4234 9232

This post might explain it better: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=3914

HTH,

Tim
Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2006-07-04 : 07:02:06
You can look at BOL (Books OnLine - Help from Query Analyzer) for questions like this. This one is under "cross-tab reports" or "pivot table".


Ryan Randall
www.monsoonmalabar.com London-based IT consultancy

Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page
   

- Advertisement -