Category Archives: T-SQL

  1. Commenting a branching IF-THEN-ELSE.

    1

    October 19, 2021 by Kenneth Fisher

    I’m a big fan of comments (MSSQL, Powershell), so along those lines here’s an interesting way to comment an IF-THEN-ELSE …
    Continue reading

  2. Code examples : T-SQL Tuesday #143

    Leave a comment

    October 12, 2021 by Kenneth Fisher

    It’s TSQL Tuesday! John Armando McCormack (blog|twitter) is our host this month and he’d like us to share some of …
    Continue reading

  3. Dealing with foreign keys when deleting rows.

    2

    October 7, 2021 by Kenneth Fisher

    Deleting rows from a table is a pretty simple task right? Not always. Foreign keys, while providing a ton of …
    Continue reading

  4. Database Sizes

    7

    September 14, 2021 by Kenneth Fisher

    Quick query today. I needed a list of database sizes so came up with this: Nothing exciting, but I figure …
    Continue reading

  5. Experiment: Does sp_recompile on a table update associated views.

    2

    August 17, 2021 by Kenneth Fisher

    tldr: No. You have to use sp_refreshview. One of the only good things to come out of all of the …
    Continue reading

  6. Padding a string in SQL Server

    1

    July 15, 2021 by Kenneth Fisher

    I’ve been working on converting a piece of DB2 code into T-SQL and one of the functions I had to …
    Continue reading

  7. CROSS vs OUTER APPLY

    2

    June 10, 2021 by Kenneth Fisher

    I love CROSS APPLY. I also love OUTER APPLY. What’s the difference though? The same difference as with an INNER …
    Continue reading

  8. Creating a configurable SSMS script

    1

    May 18, 2021 by Kenneth Fisher

    Several times over the last few weeks I’ve gotten a request to create a new work database. The individuals from …
    Continue reading

  9. All jobs that ran during a given time frame.

    1

    May 6, 2021 by Kenneth Fisher

    Short post today. Simple query that will tell you every job that ran between two datetime stamps. Note: this of …
    Continue reading

  10. SQL Homework – December 2020 – Participate in the Advent of Code.

    Leave a comment

    December 3, 2020 by Kenneth Fisher

    Christmas. Depending on where you live it’s a big deal even if you aren’t Christian. It pervades almost every aspect …
    Continue reading

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,581 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013