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
 Transact-SQL (2000)
 crosstable? or something else...

Author  Topic 

koffiemokje
Starting Member

1 Post

Posted - 2007-07-11 : 08:40:21
Hi all,

I'm not sure if this can be done but here goes:
I need this table:

id type
1 237
1 12
3 501
7 1209
7 1
7 12
8 123

As an output table like this:

id type1 type2 type3
1 237 12 0
3 501 0 0
7 1209 1 12
8 123 0 0

Can anyone please help me?

Thanks in advance!

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-07-11 : 08:44:50
Read about Cross-tab reports in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -