SELECT 'Name', 'Rows', 'Reserved', 'Data', 'IndexSize', 'Unused'
UNION
SELECT Name, Rows, Reserved, Data, IndexSize, Unused FROM ##TableSpaceUsed ORDER BY CAST(Rows AS INT)
Error:
Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'Rows'.
TRYING TO OUTPUT COLUMN NAME + RESULT SET.
Thanks!
UNION
SELECT Name, Rows, Reserved, Data, IndexSize, Unused FROM ##TableSpaceUsed ORDER BY CAST(Rows AS INT)
Error:
Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'Rows'.
TRYING TO OUTPUT COLUMN NAME + RESULT SET.
Thanks!