Forum Replies Created

Viewing 15 posts - 841 through 855 (of 2,458 total)

  • RE: Record Matching in FIFO Basic in Stock data

    FYI... The FIFO problem was the subject of an SSC competition some years ago. Many interesting techniques to take into consideration: The ‘FIFO Stock Inventory’ SQL Problem

    "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: Select records in hierarchical order

    I was going to post what Jeff posted. :Whistling:

    "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: Need to update stats when CPU is high for a particular Query

    Luis Cazares (4/15/2016)


    Alan.B (4/15/2016)


    nagkarjun1 (4/15/2016)


    Hi Folks,

    I need some suggestions on doing this task. A query was catching a bad plan and keeping CPU and no of reads very high.

    Updating/defrag Stats...

    "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: ISNULL VS COALESCE on nullible and not null columns Sargability comparison

    MadAdmin (4/15/2016)


    Hugo Kornelis (4/15/2016)


    TheSQLGuru (4/15/2016)


    Wrapping a function around a column in the WHERE clause is probably the second worst thing I see in aggregate in my consulting (with the first...

    "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: Need to update stats when CPU is high for a particular Query

    nagkarjun1 (4/15/2016)


    Hi Folks,

    I need some suggestions on doing this task. A query was catching a bad plan and keeping CPU and no of reads very high.

    Updating/defrag Stats and rebuilding indexes...

    "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: REPLACE CHARACTERS

    Below is how you'd do it if the data is stored as money or varchar...

    -- if stored as money data type

    DECLARE @x money = '$154,111.85';

    SELECT CAST(@x AS decimal(10,2));

    GO

    -- if...

    "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: Splitting Strings in SQL Server 2016

    Interesting read Wayne. Good work sir!

    "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 is the difference between Left Outer join and Left Outer join restricted- Interview question

    This:

    I believe that these aren't official terms and they shouldn't be treated as such.

    "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: Replace a capital letter in a string

    drew.allen (4/7/2016)


    Alan.B (4/6/2016)


    You could also do this:

    REPLACE(value, char(88), '/')

    The replacement depends on the collation, and the default collation is case insensitive. Using the CHAR() function, does not change...

    "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: *** In case you missed it, SQL Server Developer's Edition is now FREE!!!! ***

    "SQL Server 2016 Developer Edition, when released later this year, will also be free. ":w00t::w00t:

    "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

    Steve Jones - SSC Editor (4/7/2016)


    Well, I'm going to opening day in CO tomorrow, for the first time in like 10 years. I used to go ever year when I...

    "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

    Cubs first series was a 2 game sweep on the road outscoring the Angels 15-1. We're already 5 games up on the Cards. Feeling good here in Chicago.

    "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: Optimize very frequent running SP

    So it's the first query in your proc taking all the time, the part that does the insert into #TempUsers. Quite frankly that plan does not look too terrible and...

    "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 Code Snippets in SSMS

    SQLvis (4/7/2016)


    Are there any examples for creating an MDX Snippet?

    That was my first thought. 😉

    You just have templates. I just found this article: http://byobi.com/blog/2013/04/ssms-templates-for-ssas-developers/%5B/url%5D

    "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 Code Snippets in SSMS

    Great article Luis. I have learned something new today. I never played around with snippets but have a dozen ideas how they can make life easier.

    "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 - 841 through 855 (of 2,458 total)