Technical Article

User-Created GENERATE_SERIES() Function for Older SQL Server Versions

In the world of SQL Server, adaptation is key. While the built-in GENERATE_SERIES() function was a valuable addition in SQL Server 2022, its absence in older versions created a functionality gap. Enter the user-written GENERATE_SERIES function. Adapted from Jeff Moden's "dbo.fnTally", it offers an efficient means to generate a series of numbers within a defined range in older SQL Server versions. Its design mirrors the built-in function in SQL Server 2022, making the transition between versions as simple as removing the dbo. prefix. This forward-thinking design reflects the ingenuity of the SQL Server community, ensuring a seamless, efficient database migration experience.

You rated this post out of 5. Change rating

2023-06-26 (first published: )

806 reads

Technical Article

Extract parts of the strings from the SQL results directly by using SQL's substring-extraction API functions

If you need to extract a substring or create a longer string by combining multiple strings, there are a few methods you can use. To extract a specific portion of a string, you can utilize a substring-extraction function.

You rated this post out of 5. Change rating

2023-05-09 (first published: )

221 reads

Technical Article

Python 3 Script for Generating SQL Insert Statements from CSV Data

This Python 3 script is designed to take CSV file data pasted into the csv_data variable and generate SQL insert statements that can be used to insert the data into a MySQL database. The script is easy to use and can save you a lot of time when working with large amounts of data.

You rated this post out of 5. Change rating

2023-05-08 (first published: )

2,875 reads


Azure SQL MI License free?


A common setup when leveraging the cloud is to use the cloud for Disaster...

Foreign Keys in SQL Data Generator


A customer recently asked about using FKs in SQL Data Generator, and I decided...

Humble Bundle of Java Books


I try to keep an eye on the Humble Bundle bundles for books. The...

Read the latest Blogs



By mtz676

DECLARE @FilesCmdshell TABLE ( outputCmd NVARCHAR (255) ) DECLARE @FilesCmdshellCursor CURSOR DECLARE @FilesCmdshellOutputCmd AS...

Query Execution Modes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Query Execution Modes

The Art of the Code Review

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Art of the Code...

Visit the forum

Question of the Day

Query Execution Modes

What are the two distinct processing modes that the SQL Server Database Engine can use to process T-SQL statements?

See possible answers