Tag Archives: code language

  1. SELECT FORMAT(COUNT(1),’N’) FROM TableName WITH (NOLOCK);

    9

    December 26, 2023 by Kenneth Fisher

    Alternate title: How do I tell how far I am on that command? This little command (frequently with a WHERE …
    Continue reading

  2. How do I tell if identity_insert is turned on and if so what table?

    4

    June 24, 2022 by Kenneth Fisher

    TLDR; The code to do this is below but it’s a bit hokey and probably isn’t worth it. It’s pretty …
    Continue reading

  3. Running dynamic SQL in a different database

    10

    May 19, 2022 by Kenneth Fisher

    This is one of those things that on hindsight was a stupid problem, but still cost me hours and a …
    Continue reading

  4. 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

  5. Long names vs short names (or aliases)

    9

    June 15, 2021 by Kenneth Fisher

    I remember when I was first learning to code there was always the argument of how long a name should …
    Continue reading

  6. 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

  7. Generate a random number of children for each parent

    4

    October 3, 2018 by Kenneth Fisher

    I was asked an interesting question the other day. Is it possible to get a different random number of rows …
    Continue reading

  8. Escaping strings

    Leave a comment

    September 24, 2018 by Kenneth Fisher

    No, I’m not talking about that nightmare everyone has where a bunch of strings are chasing you across a loom. …
    Continue reading

  9. Using Table Valued Parameters with sp_executesql

    3

    September 13, 2018 by Kenneth Fisher

    Recently I did a presentation on dynamic SQL. In the presentation I pointed out the similarity of using sp_executesql to …
    Continue reading

  10. SQL Puzzle: Advent of Code

    Leave a comment

    August 29, 2018 by Kenneth Fisher

    A few years back someone started the Advent of code. If you aren’t familiar with it, it’s an advent calendar …
    Continue reading

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

Join 6,758 other subscribers

Follow me on Twitter

Archives

ToadWorld Pro of the Month November 2013