0
I have a simple sql table with four columns The data types are

Athlete nvarchar(30)
Mydate  date
Mytime  varchar(8)
Session nvarchar(40)

Sample Data
**Athlete  Mydate     Mytime   Session**
  Jerry   14/07/2014  00:00:32 200M 
  Jerry   14/07/2014  00:00:31 200M
  Jerry   16/07/2014  00:00:59 400M
  Jerry   16/07/2014  00:00:57 400M
  Jerry   16/07/2014  00:00:58 400M

  Now what i want is to create a query that outputs as below

**Athlete  Mydate     Mytime1   Mytime2  Mytime3  Mytime4  Mytime5  Mytime6  Mytime7  Mytime8  Mytime9  Mytime10  Session**
  Jerry   14/07/2014  00:00:32  00:00:31                                                                          200M    
  Jerry   16/07/2014  00:00:59  00:00:57 00:00:58                                                                 400M    

  is this possible.?
3
Contributors
4
Replies
21
Views
3 Years
Discussion Span
Last Post by adam_k
0

Hi
That topic no longer exists,but it would be most helpful if you could provide
a solution using dynamic sql as it would very useful to not have a restriction on number of columns for mytime.

Thank you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.