Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Query idea!

    Maybe this will work for you

    WITH P (RN,ID,[NAME]) AS (

    SELECT

    ROW_NUMBER() OVER (ORDER BY ID)

    , ID

    , [NAME] FROM MYTABLE

    )

    SELECT

    T1.ID,T1.[NAME], T2.ID,T2.[NAME]

    FROM

    P T1 LEFT JOIN P T2 ON T1.RN =...

Viewing post 1 (of 1 total)