Heh... No... I'm saying the following is wrong...
FROM sys.tables AS tbl where tbl.[font="Arial Black"]Name[/font] = CAST([font="Arial Black"]object_id(@TableName)[/font] AS VARCHAR(100)) ORDER BY 1
😉
--Jeff Moden
Change is inevitable... Change for the better is not.