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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Crosstab query
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

36 Posts

Posted - 09/02/2006 :  04:20:24  Show Profile
Crosstab concepts

I m using Sql server 2000 version
I want to create a simple crosstab… as like the follows

My table is as like

Date warehouse (WH) Delivery No
7/7/2006 10 10-1
7/7/2006 20 20-1
7/7/2006 20 20-2
7/7/2006 30 30-1
8/7/2006 10 10-2
8/7/2006 10 10-3
11/7/2006 30 30-2
11/7/2006 20 20-3

I want to make a report using crosstab in iReport…..

I want report will be as like

Date WH10 WH20 WH30 total delivery
7/7/2006 1 2 1 4
8/7/2006 2 0 0 2
11/7/2006 0 1 1 2

my questions are:

i create a crosstab procedure and it is running but

01. I want to know the query.
02. How I count/sum the wh in the crosstab? (cause the WH is arrange as row in my database table )

I want step by step instructions
I have not clear concepts about crosstab, but I know crosstab will give the solution of this problem

Please help……

Mainur rahman


Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 09/02/2006 :  06:15:31  Show Profile
Duplicate of

Rishi Maini
Go to Top of Page

Starting Member

36 Posts

Posted - 09/02/2006 :  06:31:33  Show Profile  Click to see magnetica's MSN Messenger address
Why have you posted loads of the same threads just across different categories of the forum???

If you think you know it all?! You know nothing!
Go to Top of Page

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 09/02/2006 :  06:35:44  Show Profile
I think he was desperate to get an answer ASAP :-)

Rishi Maini
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000