Posts

SQL Art, Part 2: New Year Fireworks in SSMS (Yes, Really)

 Last time we turned SQL Server into a Christmas card. This time we’re doing something even less sensible: fireworks. Not charts. Not dashboards. Not “data visualization”. Actual fireworks, built from SQL Server geometry shapes and rendered in SSMS. What you’ll get Random firework bursts in the sky Rings, cores, rays, and trails “HAPPY NEW YEAR” stamped in spark pixels One simple way to remix it without understanding all the math If you want a reminder that SQL is just a programming language with a storage habit, this is it. Run it Paste this into SSMS, execute, then view the results in the spatial viewer. USE tempdb; GO DROP TABLE IF EXISTS #scene; DROP TABLE IF EXISTS #centers; CREATE TABLE #scene (shape geometry); CREATE TABLE #centers ( id int identity ( 1 , 1 ) primary key , x float not null , y float not null , r float not null ); DECLARE @Fireworks int = 6 ; -- bursts DECLARE @Rays int = 12 ; -- r...

SQL Art: I Made a Christmas Card in tempdb

Most people use SQL Server to count things. I used it to draw a Christmas tree. In a database. On purpose. If you’ve ever stared at SSMS and thought “this could use more festive chaos”, this is for you. What we’re doing We’re going to: Create a temp table in tempdb Insert a bunch of geometry polygons that form a tree, trunk, and star Stamp “MERRY CHRISTMAS” on top using more polygons Render “AND A HAPPY / NEW YEAR” using a tiny pixel font built from squares Add random baubles because discipline is overrated Union it all so SSMS shows one clean shape Then SSMS becomes your art gallery. The only requirement You need SQL Server with the geometry type available (so basically modern SQL Server). SSMS helps because it can render spatial results visually. Run this Paste the whole thing into SSMS and execute it. Then click the Spatial results tab (or the spatial viewer) and enjoy your database becoming a greeting card. USE tempdb; GO DROP TABLE IF EXISTS #xmasTREE; C...

Taking Control: From Simple Views to Powerful Exports 🗃️

👨‍🏫 Teaching Moment: Exporting Data Like a Pro It’s been such a rewarding journey guiding Kai through the world of database development. What makes it exciting is that he’s not just coding—he’s thinking about the “why” behind each line. 🧠 One of our latest breakthroughs involved adding a very practical feature: letting the user export data from the app as a CSV file they can save, open, or share. Kai: “I’ve got my grade report showing up perfectly. But how do I get it out of the app so I can send it to someone?” Me: “Great question, Kai! Displaying data is one thing—but exporting it? That’s next-level. We’ll add a button that generates a CSV file, so anyone can open it in Excel, Google Sheets, or any spreadsheet tool.” And so, our mission began: Build an Export to CSV feature. ❓ Why Bother? (Kai’s Classic Question) Kai: “If the data is already in the <GridView> , can’t we just copy it?” Me: “That might work for you, but think about scale....