Forum Replies Created

Viewing 15 posts - 226 through 240 (of 2,462 total)

  • RE: Fuzzy Search

    I always enjoy seeing different approaches to handling fuzzy matching in SQL Server. That said, there are many issues with this approach that I don't want to dive into 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: Why Scalar Functions Can Be Costly

    TheSQLGuru - Monday, January 4, 2016 7:02 PM

    Not even for Check Constraints since you can get bad data. Search for sql server...

    "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: Why Scalar Functions Can Be Costly

    Jeff Moden - Saturday, June 3, 2017 8:44 AM

    Alan.B - Monday, January 4, 2016 11:16 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 change existing column to a computed column

    Phil Parkin - Friday, July 21, 2017 9:00 AM

    binutb - Friday, July 21, 2017 7:54 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: Concatenate rows into string

    DesNorton - Thursday, July 20, 2017 5:29 AM

    info 58414 - Thursday, July 20, 2017 4:00 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: Year, Month and Days from date of birth table

    Building off of Luis' excellent solution...
    This:

    -- Sample data, solution
    DECLARE @samples TABLE (dob date);
    INSERT @samples VALUES
    ('20161102'),('20150326'),('20150717'),('20140818'),('20120712'),('20121201'),('20120522');

    -- Solution
    SELECT dob,

    "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: Year, Month and Days from date of birth table

    Note the line in my signature about the best way to get help. Pictures aren't the easiest because we can't copy/paste from an image. 

    That said, what you are...

    "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: Separate rows depend on Previous Row

    ikrami2000 - Friday, July 14, 2017 11:34 AM

    i need to get the data depend on Category (Food,beverage, hot drinks,....)
    but to be not...

    "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: Separate rows depend on Previous Row

    ikrami2000 - Friday, July 14, 2017 10:36 AM

    the below working find with three rows :
    DECLARE @test-2 TABLE (ID int, Name varchar(30), ...

    "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: Separate rows depend on Previous Row

    Phil beat me to it. We need more/better sample data and clearer expected results.  Something like this for the sample data:


    DECLARE @yourtable TABLE (id int,...

    "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: Get DDL for any SQL 2005 table

    I still love this proc Lowell (I'm using your newest version of sp_GetDDLa). I know I've posted that in this thread before. I thought I'd take a moment to include...

    "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: Help with query

    Jacob Wilkins - Wednesday, July 12, 2017 3:50 PM

    Here's another way (based on the original sample data with two table variables) 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: Unlimited PTO

    I've interviewed at a couple places that offer this and drilled them pretty extensively about it. It seems like a good deal - you're going to be able to take...

    "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: separating SSRS from Database server - SQL server 2016 standard

    bgz30 - Tuesday, July 11, 2017 2:08 PM

    when SSRS component is installed on a different server from Database server, will there be...

    "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: The Panjandrum Conundrum

    I just started playing around with SQL 2017 and was enthusiastic about TRANSLATE and STRING_AGG. STRING_AGG is long overdue and performs a wee-bit better than using the FOR XML PATH('') method 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

Viewing 15 posts - 226 through 240 (of 2,462 total)