Tally Table

Technical Article

Create a Tally Function (fnTally)

  • Script

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.

4.86 (7)

You rated this post out of 5. Change rating

2019-08-13 (first published: )

5,392 reads

SQLServerCentral Article

Tally OH! An Improved SQL 8K “CSV Splitter” Function

  • Article

The Tally Table has proven to be a simple and elegant method for avoiding many varieties of RBAR. Unfortunately, one of its more common uses, that of a CSV splitter, has a well-known and serious performance problem. MVP Jeff Moden shows us what that problem is and how to correct it. (UPDATED with additional info and attachments on 5/12/2011).

4.83 (189)

You rated this post out of 5. Change rating

2012-12-28 (first published: )

128,523 reads

Blogs

FDD 2023 – Session Materials

By

You can find the slides for my session at Future Data Driven summit at...

Quick Filtering in SSMS–#SQLNewBlogger

By

I saw someone limit the databases they see in SSMS, which isn’t something I...

Penetration Testing your SQL Server, Part 1 – The Recon Mission

By

Since witnessing a rather nasty cyber attack around a year ago, I’ve been thinking...

Read the latest Blogs

Forums

Convert Binary or Hex field to show text information

By kakovatos7

Hi all, I have an SQL database table with events, and within it a...

Write https request to azure blobstorage

By Charmer

Hi All, I have been trying to download a csv file which is produced...

High tempdb usage alternatives

By anoop.mig29

Hi We have an stored procedure which runs frequently and  it contain logic in...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers