You'd never want to use a loop or cursor for something like this. A tally table or function would be orders of magnitude more efficient.
You'd never want to use a loop or cursor for something like this. A tally table or function would be orders of magnitude more efficient.