Scripts

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: )

2,395 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: )

299 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: )

5,293 reads

Technical Article

Converting To/From User Friendly Trigesimal Geocodes

The Problem As a data professional, I have often wished that there was a short, simple, and universal code to enable finding a place on earth. Addresses are nice but require a government authority to build a road, name it, and number its locations, and standardize its entry / use, and then they are far […]

You rated this post out of 5. Change rating

2023-03-30 (first published: )

182 reads

Blogs

Moving to Rancher Desktop

By

I’ve been very happy with Docker Desktop for years, running it on both laptop...

Logging in Azure Data Factory data flows

By

(2025-June-15) Long gone are the days when a data engineer could simply focus on building...

ADF: Publish suddenly includes everything where it used to be incremental changes since the last publish

By

I recently encountered an interesting issue with ADF where the publish feature suddenly attempted...

Read the latest Blogs

Forums

How Many Can Be the Greatest

By Steve Jones - SSC Editor

Comments posted to this topic are about the item How Many Can Be the...

How to process images and analyze charts with AI

By Daniel Calbimonte

Comments posted to this topic are about the item How to process images and...

Patching the Patch

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Patching the Patch

Visit the forum

Question of the Day

How Many Can Be the Greatest

I am trying to analyze a number of columns in a large table to determine the highest value for each row. In SQL Server 2022, we have the GREATEST function, which will return the greatest value from those columns passed in. How many columns can I include in an expression like this:

select GREATEST( col1, col2, col3, ...)

See possible answers