Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
i am writing a query where i need my first 4 rows column with value say 14 next 4 rows col values 12 and next 4 rows value 10 and so on
sodeep
Master Smack Fu Yak Hacker
7174 Posts
Posted - 2009-02-04 : 00:20:35
Here is my shot:
Select Top 4 Replicate(14,1) as Numberfrom dbo.spt_valuesunion allSelect Top 4 Replicate(12,1)from dbo.spt_valuesunion allSelect Top 4 Replicate(10,1)from dbo.spt_values