Tag Archives: T-SQL

  1. HAL0004 – I don’t feel well Dave


    June 29, 2020 by Kenneth Fisher

    It’s another HAL! Every once in a while (4 times now) I come up with a terrible terrible idea for …
    Continue reading

  2. End an ALTER DATABASE immediately if anyone is in the database.


    June 11, 2020 by Kenneth Fisher

    The development team has told me they’ve shut down the application, there are no more connections and I can go …
    Continue reading

  3. Use session_context to create a “variable” that lasts between batches.


    May 26, 2020 by Kenneth Fisher

    The other day I had a brief conversation with Itzik Ben-Gan (about|twitter) on twitter and I have to tell you …
    Continue reading

  4. Negative (-) is an operator and will affect the order of operations.


    May 18, 2020 by Kenneth Fisher

    An interesting question came to my attention the other day. A strange operation problem in SQL Server: -100/-100*10 = 0 …
    Continue reading

  5. Explain CROSS APPLY like I’m 5.


    May 11, 2020 by Kenneth Fisher

    A good friend of mine (Randolph West (blog|twitter) asked that someone Explain CROSS APPLY like they are 5. So, here’s …
    Continue reading

  6. Is there an easy way to tell what pricing tier my Azure SQL DB/DW is using T-SQL?


    April 22, 2020 by Kenneth Fisher

    I ran into an interesting problem today. I needed to find out the pricing tier of an Azure SQL DB …
    Continue reading

  7. Why you should never use default string lengths.

    Leave a comment

    March 25, 2020 by Kenneth Fisher

    TL;DR; You probably don’t know what you’re going to get. Even if you do know the person maintaining your code …
    Continue reading


    Leave a comment

    March 23, 2020 by Kenneth Fisher

    It’s amazing the things that SQL can do these days. It’s also amazing how many of them I’ve managed to …
    Continue reading

  9. Set a variable and update a column at the same time.


    February 19, 2020 by Kenneth Fisher

    The other day I saw a weird option for the UPDATE command in a stack overflow answer. Basically it looked …
    Continue reading

  10. Error message: http://System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the varchar value ‘NULL’ to data type int.


    December 5, 2019 by Kenneth Fisher

    I love this error. Primarily because it demonstrates two very important things. Errors matter. Make sure when you ask someone …
    Continue reading

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

Join 3,613 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013