Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Aged Yak Warrior
; WITH CTE AS
(SELECT LOGID, Types, ROW_NUMBER() OVER(PARTITION BY LOGID Order by Types) as RN
SELECT T1.LOGID, T1.Types as Col1, T2.Types as Col2
FROM CTE T1 LEFT JOIN CTE T2 ON T1.LOGID = T2.LOGID and
T1.RN = T2.RN-1 where T1.RN = 1;
Very Important crosS Applying yaK Herder