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)
 How to display rows as columns

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-19 : 11:23:34
Janaka writes "Hi..
How to display rows as columns ?
I wanna get an output which is simmilar to below
for that I have 2 tables

Table 1
-------
ID NAME
1 aaaa
2 bbbb
4 dddd


Table 2
-------
ID LEAVET AMT
1 A 5
1 C 1
2 A 2
2 C 5
4 A 2
4 M 30

Output should be
==================
ID NAME A C M
1 aaaa 5 1 -
2 bbbb 2 5 -
4 dddd 2 - 30"

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-03-19 : 11:23:34
http://www.sqlteam.com/item.asp?ItemID=2955
Go to Top of Page
   

- Advertisement -