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.
Author |
Topic |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-03-14 : 05:07:08
|
ID IDStatus IDDate1 Processing 2013-01-121 Pending 2013-01-15Can i apply it in one row as below?ID IDDateProcessing IDDatePending1 2013-01-12 2013-01-15 |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-03-14 : 06:07:50
|
select Id, [Processing] AS IDDateProcessing, [Pending] IDDatePendingfrom (SELECT * FROM TableName) pPivot( MAX(IDDate) FOR IDStatus IN ([Processing], [Pending]) )pvt--Chandu |
|
|
|
|
|