In the Query Analyser, set the Result mode to Text (Press CTRL+T) and run the following code
set nocount on
select top 10 row_number() over (order by name) as no from sysobjects
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