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)
 change from Vertical (tbl view) into Horizontal (tbl view)

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-08-30 : 06:21:03
Marvin writes "Hi,

What I need is the following, a StoredProc that make a Vertical (normal table) into a Horizontal Table :
So From:

tbl_Vertical(Normal)
CustNo__Item

__1______1
__1______3
__1______4
__2______2
__2______3
__2______7

Into:
tbl_Horizontal
CustNo___1__2___3___4___7

_1_______X______X___X
_2__________X___X_______X

Anny help would be verry appriciated"

gpl
Posting Yak Master

195 Posts

Posted - 2004-08-30 : 07:29:58
Do a search for pivot / crosstab

this is a great article

http://www.sqlteam.com/item.asp?ItemID=2955

Graham
Go to Top of Page
   

- Advertisement -