Create a Tally Function (fnTally)
Many people have published high performance, read-less, Inline Table Valued functions that use Itzik Ben-Gan's wonderful "Virtual Numbers Table" to replace WHILE loops and other forms of RBAR. This one is Jeff Moden's version.
2019-08-13 (first published: 2019-08-04)
6,790 reads