Forum Replies Created

Viewing 15 posts - 976 through 990 (of 2,458 total)

  • RE: A Lightweight, Self-adjusting, Baseline-less Data Monitor

    Excellent article, well written and an easy read. I need to look at/play around with your code a little more to understand what you're doing but I love the overall...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Odd (to me) Behavior with NTILE() and NULL Values in Source Data

    EdgeOfKnowWare (2/22/2016)


    Alan, I agree with you, if you're just wanting one ranking. If we expand upon the Original Posters issue (which is what I was facing) and say that you...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Returning unique row from multiple in a table variable

    jim.snyder (2/22/2016)


    Thanks, Alan. This is hospital data and I am bound by HIPAA and PMI to not give account numbers or personal information out. I understand (went to the link...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Odd (to me) Behavior with NTILE() and NULL Values in Source Data

    EdgeOfKnowWare (2/22/2016)


    No, that's not quite what I was trying to do.

    The problem I had (which lead me to this post via Google) was that I had several different rankings dependent...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Multi-valued Parameter Query issue

    Glad to help.

    <hits forehead with palm of hand!!>

    Me too. So much so that I now have a receding hairline :hehe:

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Are the posted questions getting worse?

    Phil Parkin (2/22/2016)


    Alan.B (2/22/2016)


    Ed Wagner (2/22/2016)


    Luis Cazares (2/19/2016)


    Ed Wagner (2/19/2016)


    GilaMonster (2/19/2016)


    SQLRNNR (2/18/2016)


    I am seeing people claim to be an MCM for some of these interviews. I know full well they...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Returning unique row from multiple in a table variable

    jim.snyder (2/22/2016)


    I am building a process where I have a few places that have multiple rows with the same (non-unique) key. In one area, I can use the field that...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Odd (to me) Behavior with NTILE() and NULL Values in Source Data

    EdgeOfKnowWare (2/22/2016)


    Maybe a work around would be something like this:

    SELECT *,

    CASE WHEN val IS NULL THEN 0 ELSE 1 END,

    NTILE(4) OVER (PARTITION BY CASE WHEN val IS NULL THEN 0...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Multi-valued Parameter Query issue

    I am very confused since I am not delimiting a string

    If you are using multi-select in SSRS then SSRS is passing a comma-delimited string to your query or stored proc....

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Are the posted questions getting worse?

    Ed Wagner (2/22/2016)


    Luis Cazares (2/19/2016)


    Ed Wagner (2/19/2016)


    GilaMonster (2/19/2016)


    SQLRNNR (2/18/2016)


    I am seeing people claim to be an MCM for some of these interviews. I know full well they aren't an MCM....

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Stairway to Advanced T-SQL Level 1: Introduction to Advanced Transact SQL Stairway and Using the CROSS JOIN Operator

    Jacob Wilkins (2/22/2016)


    Alan.B (2/22/2016)


    Jacob Wilkins (2/19/2016)


    kkilsby (2/19/2016)


    Doesn't the SQL DB engine first create a cross join for any query involving more than one table? So performance isn't an issue for...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Stairway to Advanced T-SQL Level 1: Introduction to Advanced Transact SQL Stairway and Using the CROSS JOIN Operator

    Jacob Wilkins (2/19/2016)


    kkilsby (2/19/2016)


    Doesn't the SQL DB engine first create a cross join for any query involving more than one table? So performance isn't an issue for a cross join...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Creating Filtered Index with OR Statement

    Bill Talada (2/19/2016)


    I often create two filtered indexes when I have a need for an OR.

    What does that accomplish?

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Surfing

    How many of you have gotten up before dawn, driven to the coast, gotten on a long piece of fiberglass and paddled into the ocean before turning around to ride...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Using Parameters in a Query is Killing Performance

    Jacob Wilkins (2/17/2016)


    Alan.B (2/17/2016)


    The UpdateDt column in the Users table is DATETIME so I wouldn't expect any datatype conversion issues.

    Perhaps... To know for sure check the query plan (the actual...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 976 through 990 (of 2,458 total)