Viewing 6 posts - 1 through 6 (of 6 total)
Recursion works well for this:
set nocount on
declare @GroupCount int = 5
declare @MinValue bigint = 5000000000000480
declare @MaxValue bigint = 5000001000000690
declare @RowsPerGroup bigint =...
January 23, 2019 at 12:01 pm
I posted a very similar solution over a year ago on http://www.mssqltips.com here. Not accusing you of anything but thought my solution would add some value. ...
November 7, 2017 at 12:08 pm
This article is excellent. After managing hundreds of packages through monthly updates that require metadata changes to support all types of changes to database schema and package code this...
July 13, 2015 at 12:00 pm
I have a new solution. This one is Recursive CTE but only builds valid solutions instead of all solutions. It will produce the 3.6 million permutations for a...
June 2, 2015 at 8:52 pm
This uses a binary mask to select the unique sets where one of each character are present. It runs in about 14 seconds.
declare @t varchar(10) = 'ABCDEFGH'
;with src(t,n,p) as...
May 22, 2015 at 4:45 pm
;with src(val) as (
select 1 union all
select 2 union all
select 2 union all
select 3 union all
select 3 union all
select 3
),
row(val,rn) as (
select val,
row_number() over (partition by val order by (select...
December 5, 2013 at 1:34 am
Viewing 6 posts - 1 through 6 (of 6 total)