Forum Replies Created

Viewing 15 posts - 106 through 120 (of 2,458 total)

  • RE: Single value in selection with groups

    This perhaps? 

    SELECT FullName, NewType, SUM(Amount1), SUM(Amount2)
    FROM
    (
    SELECT TOP (1) FullName, NewType, Amount1, Amount2
    FROM @test-2
    ORDER BY TDate...

    "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: Calculating Work Days

    I stumbled across this while looking to create my own and would like to propose a couple changes:  
    First, I have noticed lately moving filters from a WHERE clause to a...

    "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 get Last Occurance of % value in the string...

    Sergiy - Friday, June 1, 2018 7:05 AM

    Alan.B - Tuesday, May 29, 2018 11:29 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

  • RE: How to get Last Occurance of % value in the string...

    ChrisM@Work - Tuesday, May 29, 2018 10:07 AM

    Using Jeff Moden's et al's splitter makes this very easy. Split on spaces,...

    "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: Array in specific columns

    Can you provide an example of what the array looks like and what type of array it is? 

    Problem is that the array can contain up to 250...

    "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: Performance Question

    Fixing your data model to avoid this type of tomfoolery is always my first choice.

    "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: Frustrating Ola Hallengren log file (ldf) backup issue

    Thanks folks for the replies. After a little more research I discovered that the problem was related to periodic connectivity issues between the server and the SAN. I never saw...

    "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: Frustrating Ola Hallengren log file (ldf) backup issue

    Beatrix Kiddo - Wednesday, May 9, 2018 6:12 AM

    I'm sure you've tried this already, but have you tried explicitly granting permissions (to...

    "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: Remove duplicate substrings from string

    Another really fast way to tackle this (using NGrams8k - link is in my signature):

    SELECT *
    FROM #stringsplit s
    CROSS APPLY
    (
    SELECT STUFF(REPLACE((

    "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: TRIM() in T-SQL

    I must admit, when I saw the title, TRIM() in T-SQL my first thought was, "boring!" 
    That said - I was quite impressed and found the article to be quite...

    "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: Inside the SQL Server Query Optimizer

    david.stephens - Friday, April 6, 2018 2:16 PM

    I had the same issue not seeing an obvious way to submit my information or...

    "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: Inside the SQL Server Query Optimizer

    For those who have not read this book I highly suggest it. I picked up a physical copy at SQL In the City 2012 and could not put it down....

    "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: Inside the SQL Server Query Optimizer

    TheRedneckDBA - Friday, March 4, 2011 2:18 PM

    Anyone know when this will be officially published?

    In 2010 I think.

    "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: ETL or ELT

    RonKyle - Wednesday, April 4, 2018 5:34 AM

    It is not uncommon that the culprit is poorly designed transformation inside the ETL...

    "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: Columns Order in XML output of SSRS report

    i have a [tables] which contains ssn, city, state, zip columns after i run this report and save as xml 
    then reopen it shows columns order as xip, state, city,...

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