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 2008 Forums
 Transact-SQL (2008)
 display data with unknown number of column

Author  Topic 

deva
Starting Member

1 Post

Posted - 2010-05-01 : 05:19:57
Hi!my english is bad sorry.

I work with management education project , I have table module contains several matter,module(id_mo,libelle_mo,..)
Table MATTER (id_ma, libelle_ma, id_module)
11_____matter1_____1
12_____matter2_____1
13_____matter3_____2
Student (id_student ,....)
exam (id_student, id_ma,marks )
I want this presentation for each module : (id_student, mark_matter1, mark_matter2)
but i dont khnow how meny matter in a module so i cant using the pivot .
Help me thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-05-01 : 05:21:41
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -