Forum Replies Created

Viewing 15 posts - 301 through 315 (of 2,458 total)

  • RE: Extracting Number from Text

    There's many ways to tackle this, here's a few:Sample data

    CREATE TABLE #TEMP(ID Varchar(200));

    INSERT #TEMP
    VALUES ('ABC205916_DAN'),('ABC243296'),('ABC222249_DAN25'),('IN217465_v99'),('ABC#243296');
    GO

    If it's...

    "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: Problem running cmd file from SQL Agent

    The cmd file works no problem from the command line


    You are running the file locally or on the remote system? I don't know anything about Putty 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: SELECT @local_variable '=' Versus SELECT @local_variable '+='

    Correct that this has nothing to do with joins or anything that Joe was talking about. 

    The += syntax is an example of a compound assignment operator; These...

    "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: Windows Functions: Tell me when that changes.

    Luis Cazares - Wednesday, March 22, 2017 1:17 PM

    bc_ - Wednesday, March 22, 2017 12:43 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: Are the posted questions getting worse?

    Lynn - I'm good at dealing with XML in SQL too. Post the code and I'll also be happy to take a look.

    "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?

    Jeff Moden - Wednesday, March 15, 2017 8:49 PM

    Alan.B - Wednesday, March 15, 2017 3:01 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: Are the posted questions getting worse?

    Lowell - Wednesday, March 15, 2017 1:32 PM

    Sean Lange - Wednesday, March 15, 2017 12:50 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: Are the posted questions getting worse?

    Luis Cazares - Wednesday, March 15, 2017 12:32 PM

    I was looking for a reference to reply on a thread and found this...

    "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: Converting Stored Procedure to Function

    Sergiy - Wednesday, January 25, 2017 3:19 PM

    I'm currently thinking of converting a TVF to a stored procedure.
    There are complications, especially 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: Comma separated list

    Sergiy - Wednesday, January 25, 2017 3:32 PM

    Try not to use DISTINCT.
    Ever.
    Just forget this keyword exists 

    As for this query - keep 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: COUNTING TIME DIFFERENCE IN YEAR, MONTH, DAYS

    ChrisM@Work - Thursday, January 19, 2017 5:41 AM

    Deny Christian - Monday, January 16, 2017 1:55 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: A Possible Alternative to SQL UNPIVOT

    Interesting technique Paul. Well done.

    "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 Salary Range

    Jeff Moden (1/7/2017)


    Alan.B (1/3/2017)


    Great post Steve, 5 stars.

    I found out a few weeks back that my department is moving to Phoenix AZ. I did not chose to transfer so...

    "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 Columnstore Indexes Level 11: Optimizing Queries For Batch Mode (Part 2)

    Fantastic article Hugo. I really love this stairway series - really great stuff.

    "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: Formatting Data for Reporting

    You can also try attaching you tables to Excel and format the data however you'd like there. Excel has become a great reporting tool in recent years.

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