Home Forums SQL Server 2008 T-SQL (SS2K8) Possible to vary column names in cross apply based on different columns in each table? RE: Possible to vary column names in cross apply based on different columns in each table?

  • Lol, ignore the enough for 12 years. Instead of retyping the inline tally code, I stole it from another solution (one of Luis')

    Missed that comment and left it in.

    Please do the following. For the table generating the error, please go to SSMS, right click on the table and select "script table as" and create, and then post that script here.

    17 should have been the right offset if you wanted the 21st column to be the first one shown.

    The error message you cited indicates that it ran out of columns in an unexpected place.