| Author |
Topic  |
|
bklr
Flowing Fount of Yak Knowledge
India
1693 Posts |
Posted - 02/04/2009 : 04:04:30
|
ur welcome 
try to post as new post don't post ur query in other's post |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 02/04/2009 : 09:06:53
|
quote: Originally posted by basawareddy
Hi Bklr,
its Great, i got exact result. I was missing Max, becoz of that i was getting null values.
Thanks alot.
Regards, Basawareddy.
Hi Basawareddy, In future please post questions as a new thread rather than hijacking old thread. This will increase visibility and you'll get solutions quicker. |
 |
|
|
ssatjap1
Starting Member
4 Posts |
Posted - 11/28/2011 : 10:40:16
|
Hello, I'm very new to SQL, and I am trying to figure out how to pivot the following table:
date ID Y/N 2/1 1 Y 2/2 2 N 2/3 3 NULL etc..
I want to keep the dates as rows, make the ID as columns, and the Y/N as the value.
I have a very large data set, and I want to use the ID numbers as the column names.
For example:
Date 1 2 3 2/1 Y NULL NULL 2/2 NULL N NULL 2/3 NULL NULL NULL
etc.
I would appreciate anyone's help on this matter.
Thank you. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 11/28/2011 : 10:48:20
|
quote: Originally posted by ssatjap1
Hello, I'm very new to SQL, and I am trying to figure out how to pivot the following table:
date ID Y/N 2/1 1 Y 2/2 2 N 2/3 3 NULL etc..
I want to keep the dates as rows, make the ID as columns, and the Y/N as the value.
I have a very large data set, and I want to use the ID numbers as the column names.
For example:
Date 1 2 3 2/1 Y NULL NULL 2/2 NULL N NULL 2/3 NULL NULL NULL
etc.
I would appreciate anyone's help on this matter.
Thank you.
already replied in new thread
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
Topic  |
|