In the Query Analyser, set the Result mode to Text (Press CTRL+T) and run the following code
set nocount on select space(17-len(replicate(char(37),no)))+ replicate(char(37),no*2-1) from ( select top 10 row_number() over (order by name) as no from sysobjects ) as t union all select space(14)+replicate(char(124),5) union all select space(10)+cast(0x4861707079204E65772059656172 as varchar(100))
Tags: t-sql, sql_server, Happy-New-Year, Happy-Holidays, sqlserver, tsql, BRH,
Superb, Happy new year.
Please mention version of SQLServer as this will not work in SQLserver 2000
Really wonderful! Happy New Year to you and yours!
As Usual, Another TSQL magic from Madhivanan!
For SQL Server 2000 and older try changing line 7 to:
select top 10 id as no from sysobjects