Viewing post 1 (of 1 total)
Maybe this will work for you
WITH P (RN,ID,[NAME]) AS (
SELECT
ROW_NUMBER() OVER (ORDER BY ID)
, ID
, [NAME] FROM MYTABLE
)
T1.ID,T1.[NAME], T2.ID,T2.[NAME]
FROM
P T1 LEFT JOIN P T2 ON T1.RN =...
June 21, 2010 at 10:02 am
#1182828