Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,246 total)

  • RE: The Most Common Query Blunders...

    TheSQLGuru (12/25/2015)


    Jason A. Long (12/25/2015)


    TheSQLGuru (12/25/2015)


    How about I do a remote presentation of my Common TSQL Mistakes session? I have presented it somewhere around 100 times now for companies, User...

  • RE: The Most Common Query Blunders...

    GilaMonster (12/25/2015)


    I see these sooo many times: https://www.simple-talk.com/content/article.aspx?article=2280, plus scalar UDFs, multi-statement table-valued UDFs, nested views, non-SARGable predicates

    Gail - That's a HUGE one where I work! Our code is littered...

  • RE: The Most Common Query Blunders...

    The one I came across a couple days ago...

    WHERE LEN(t.SSN) = 9

    as opposed to

    WHERE t.SSN LIKE [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]

  • RE: LEAP and LAG behind the scenes

    Jeff Moden (12/25/2015)


    Jason A. Long (12/25/2015)


    Jeff Moden (12/25/2015)


    Jason A. Long (12/25/2015)


    Come to think of it, I had planned to write an article about creating an insanely fast "Working Days" iTVF...

  • RE: LEAP and LAG behind the scenes

    Jeff Moden (12/25/2015)


    Jason A. Long (12/25/2015)


    Come to think of it, I had planned to write an article about creating an insanely fast "Working Days" iTVF I built a few months...

  • RE: The Most Common Query Blunders...

    Jeff Moden (12/25/2015)


    Here's one thing that you should talk about... not subscribing to the absolute belief in "best practices" even if millions of people subscribe to a given "best practice"....

  • RE: The Most Common Query Blunders...

    Jeff Moden (12/25/2015)


    Ed Wagner (12/25/2015)


    Kevin, just the way you phrased "bad-data causers" made me think of the horrible offense of storing dates and times in string columns.

    Or, like MS did...

  • RE: The Most Common Query Blunders...

    TheSQLGuru (12/25/2015)


    How about I do a remote presentation of my Common TSQL Mistakes session? I have presented it somewhere around 100 times now for companies, User Groups, SQL Saturdays and...

  • RE: The Most Common Query Blunders...

    Ed Wagner (12/25/2015)


    This certainy isn't a comprehensive list, but I think it's a decent start.

    While loops or cursors instead of set-based alternatives

    Non-SARGable predicates

    Multi statement table valued functions

    Using SELECT * everywhere

    Fortunately,...

  • RE: LEAP and LAG behind the scenes

    Jeff Moden (12/24/2015)


    Well, done, Jason! I learned something new today! :w00t: You should write an article on this.

    As always, your kind words are very much appreciated. 🙂

    As far...

  • RE: Number VS Letter

    Basurmanin (12/24/2015)


    Hello, 582444567

    Goodbye...

  • RE: LEAP and LAG behind the scenes

    Jeff Moden (12/24/2015)


    It's not just the anchor. You can't use a Non-Clustered Index for the QU because of the possibility of a "Merry-go-Round" index.

    Yikes... That's what I get for...

  • RE: Number VS Letter

    Basurmanin (12/24/2015)


    Hi all,

    i have the next problem:

    i need to extract numbers from a string.

    Without using CTE, func, proc. Just query.

    Restrictions - varchar (50)

    Let`s take this example

    select 'aGk5kyO8pfas2csd444567' as word union...

  • RE: the use of CTEs

    Unless you're using recursion, a CTE can be rewritten as a derived table... Considering that derived tables (and CTEs) are processed before the outer query, CTEs can allow the code...

  • RE: LEAP and LAG behind the scenes

    Jeff Moden (12/23/2015)


    Jason A. Long (12/23/2015)


    This is just a quick test... But according to this, the Windowed SUM is going faster... see what you think...

    You've fallen into the same trap...

Viewing 15 posts - 901 through 915 (of 1,246 total)