humor

Technical Article

Stupid Coding Tricks: The T-SQL Mandelbrot

  • Script

The bar for entry into CodeSOD is pretty straight forward: professionally-developed code that elicits that certain What The— reaction. Though there have been a few exceptions over the years, generally speaking, student code, hobbyist code, and amateur code need not apply. That said, I'd like to try something a little different today. Today's example is not technically professionally-developed, it's a Stupid Coding Trick.

"So I was bored at work one day," Graeme Job explains, "and wondered, what's the most useless thing I could do with my time without actually doing anything. Then it hit me. I could use T-SQL to generate... Mandelbrot."

Graeme continued, "Following is a single T-SQL SELECT statement that generates a text-representation of a Mandelbrot Set. The results are best viewed in text-mode."

4.16 (19)

You rated this post out of 5. Change rating

2016-09-02 (first published: )

5,469 reads

Blogs

Creating a Striped Backup Set with AI

By

I needed to test a striped backup, so I decided to ask the AI’s...

SQL Server Migration Overview

By

It’s Not Just Backup / Restore At some point every company faces it: the...

Trace Flag 1448 – Lessons from a Technical Interview

By

In SQL Server environments where transactional replication runs alongside Always On Availability Groups (AGs),...

Read the latest Blogs

Forums

Create an HTML Report on the Status of SQL Server Agent Jobs

By Nisarg Upadhyay

Comments posted to this topic are about the item Create an HTML Report on...

Can/Can't Do/Don't

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Can/Can't Do/Don't

Strange String Splits

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Strange String Splits

Visit the forum

Question of the Day

Strange String Splits

When I run this code, how many rows are returned?

DECLARE @meals NVARCHAR(1000) = N'夕食昼食朝食'
DECLARE @s NVARCHAR(1) = N'食'
SELECT value
FROM STRING_SPLIT(@meals, @s)
GO

See possible answers