Microsoft
Software
Hardware
Network
Question : Create a 2 column table from sql based on qty...
Hi Experts,
Is it possible to create a script that will do the following...
Row Record
1 1
2 2
3 2
4 3
5 3
6 3
7 4
8 4
9 4
10 4
I would love to get his to 5000 records ...any thoughts??
Answer : Create a 2 column table from sql based on qty...
Sorry I read 5000 as 1000
;with cte(n,i,j) as (
select 1,1,1
union all
select
n+1,
case when j=1 then i+1 else i end,
case when j=1 then i+1 else j-1 end
from cte
where n < 5000
)
select n,i
from cte
option (maxrecursion 5000)
Random Solutions
can't find Printer Setup Utility in Mac OS X 10.5.8
Solaris 10 zone fails to start up
memory
Serialize ajax requests with jQuery
Cisco VPN Client 5.0.07.0290 on Windows 7 64 bit
Citrix Printing issue for only one user
How to sync iphone 3.1.3 with exchange server 2003
CRM 4.0 - Contracts Expiring at a specific time?
IBM Think Pad HD error
What do you think about these specs for a new System Center Operations/Configurations Manager 2007 R2 server?