adwooley2
asked on
PIVOT TABLE - SQL Server 2000
Hello. I am trying to develop an ASP.NET app that displays linear data as a pivot table, and I have no idea how to go about it. My table is set up like this:
VESSEL
VOYAGE
PORT
ARRIVAL
I want this to display in a table like the following:
VESSEL VOYAGE PORT1 PORT2 PORT3 (Ports are different)
vsl1 voy1 date1 date2 date3
vsl2 voy2 date1 date2 date3
vsl3 voy3 date1 date2 date3
Can somebody help me with this? In Access, this is pretty easy, but how do I do this in SQL Server 2000?
VESSEL
VOYAGE
PORT
ARRIVAL
I want this to display in a table like the following:
VESSEL VOYAGE PORT1 PORT2 PORT3 (Ports are different)
vsl1 voy1 date1 date2 date3
vsl2 voy2 date1 date2 date3
vsl3 voy3 date1 date2 date3
Can somebody help me with this? In Access, this is pretty easy, but how do I do this in SQL Server 2000?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Appears easy. I'll give it a try. Thanks for your quick response.
Regards,
Alan
Regards,
Alan
Creating cross tab queries and pivot tables in SQL
http://www.simple-talk.com/sql/t-sql-programming/creating-cross-tab-queries-and-pivot-tables-in-sql/