Tag Archives: sql statements

  1. Updating a view

    2

    September 30, 2015 by Kenneth Fisher

    I was recently asked how to update views. Specifically the question was about using triggers to update a view. So …
    Continue reading

  2. “sql_handle” is not a recognized table hints option.

    Leave a comment

    September 23, 2015 by Kenneth Fisher

    I’ve you’ve run a query similar to the following: And gotten an error similar to: Msg 321, Level 15, State …
    Continue reading

  3. Using @@ROWCOUNT can be a bit tricky

    2

    September 16, 2015 by Kenneth Fisher

    @@ROWCOUNT is a very useful system variable that returns the number of rows read/affected by the previous statement. It’s frequently …
    Continue reading

  4. Finding the worst running query in a stored procedure

    14

    September 10, 2015 by Kenneth Fisher

    The other day I was asked to tune a stored procedure. Not exactly an uncommon task, but I worked something …
    Continue reading

  5. Getting and storing a high precision datetime

    5

    August 13, 2015 by Kenneth Fisher

    Earlier today I was working on a project where I was recording some time stamps. In order to get as …
    Continue reading

  6. A pattern to match correctly on a value or a NULL

    3

    August 5, 2015 by Kenneth Fisher

    As you may have noticed if you read my blog I learn a lot from trolling various forums. In this …
    Continue reading

  7. What is a CTE

    1

    April 6, 2015 by Kenneth Fisher

    CTEs (Common Table Expressions) are one of the most interesting and useful tools added to T-SQL in the last decade. …
    Continue reading

  8. Clean out all bad characters from a string.

    10

    March 25, 2015 by Kenneth Fisher

    I have a customer who is having a problem with a load. He is getting a fair number of bad …
    Continue reading

  9. Why not NOLOCK?

    5

    March 18, 2015 by Kenneth Fisher

    Most senior DBAs I’ve met shudder when they hear NOLOCK. Ever wonder why? For the same reason they shudder at …
    Continue reading

  10. There are #temp tables and then there are ##temp tables.

    Leave a comment

    March 16, 2015 by Kenneth Fisher

    Temporary tables are a common enough thing in T-SQL that most of us have probably used them on a fairly …
    Continue reading

Follow

Get every new post delivered to your Inbox.

Join 848 other followers