SQL Server solution
Starting from the TABLE1 source table that contains consecutive value groups (which can reach hundreds of thousands of items) in the Serie field, we need to get to the TABLE2 table that contains the consecutive value groups, but without another grouping field in the TABLE1 table . I have implemented several solutions (recursive CTE, Cursor FETCH-ing, Self-Join on TABLE1, ... ) but none is fast enough. It's about hundreds of thousands of articles ... maybe more.
0 · Share on Twitter