Forum Replies Created

Viewing 15 posts - 181 through 195 (of 2,462 total)

  • RE: Nasty Fast N-Grams (Part 1): Character-Level Unigrams

    Jason A. Long - Monday, November 6, 2017 11:46 AM

    Alan - I know I'm a little late to the party (can't believe...

    "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: Query

    The "from [Test $G_L Entry]" is is not necessary here:
    Select '' as Code from [Test $G_L Entry]

    You could do this:
    Select '' as...

    "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: How to find the first recurring character of a string.

    I fixed Chris' Test harness code and my own solution which uses NGrams8K. It was faster. If you understand how NGrams8K works then you know that I essentially re-wrote...
    "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: Substring Question

    Jeff Moden - Monday, October 30, 2017 2:59 PM

    Alan.B - Monday, October 30, 2017 2:02 PM
    "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: Substring Question

    Another way, using Luis' sample data

    SELECT name, rtrim(ltrim(isnull(parsename(' '+x.name+' ', 2), x.name))) as name2
    FROM (VALUES('Luis.Cazares'),('Luis Cazares'),('Luis Cazares.'),('.Luis Cazares')) x(name);

    "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: Talking baseball

    Ray K - Wednesday, October 25, 2017 4:04 PM

    World Series is in full swing, and this forum is quiet!

    I predict Dodgers in...

    "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: Parameter Sniffing In Action

    carjara - Tuesday, October 24, 2017 8:48 AM

    Hi, how can I prevent this behavior?
    Is it "recompile" option the right way?

    Thank you in...

    "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: Trying to speed up this 'GetWorkingDays' function.

    Here's another one for your tests. I think it's a winner 😉

    IF OBJECT_ID('dbo.workdayCalendar') IS NOT NULL
    DROP TABLE dbo.workdayCalendar;

    -- Wide enough...

    "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: Trying to speed up this 'GetWorkingDays' function.

    sgmunson - Thursday, October 19, 2017 11:38 AM

    My gut says a calendar table in your database with a bit column for holiday...

    "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: Something interesting about patindex

    Luis Cazares - Tuesday, October 17, 2017 1:50 PM

    Did you find a real-world problem with this functionality? Or were you experimenting?

    Thanks 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: Very challenging TSQL Query

    hapsa10 - Monday, October 16, 2017 11:10 AM

    Podrías intentar hacer algo como esto.

    ;With CTE_Source As (
        Select Fl, Col
        , Val = Case
                    When...

    "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: Talking baseball

    Congrats to the Cubs. Missed the game, but heard it was exciting.

    As long as the Yanks make it, a good series is coming....

    "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: Talking baseball

    "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: What Pizzas do DBA's prefer?

    Thin Crust. Very thin and cut into slices not squares. This kind of talk has not popular in Chicago but my dad's a New Yorker and he brainwashed me early...

    "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: tsql help

    sgmunson - Wednesday, October 4, 2017 6:19 AM

    Thom A - Wednesday, October 4, 2017 5:39 AM
    "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 - 181 through 195 (of 2,462 total)