Forum Replies Created

Viewing 15 posts - 1,186 through 1,200 (of 2,458 total)

  • RE: Optimizer Building different Execution plans

    if I move the Left outer join though out the join sequence I get different execution plans and execution times.

    Depending on your table structure, moving the LEFT JOIN may 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: Retrieve String Between Two Delimiters for Multiple Occurences SQL Server

    TEJABI (10/26/2015)


    declare @str nvarchar(1000), @str1 nvarchar(400), @str2 nvarchar(500), @concat nvarchar(1000), @i int, @j-2 int

    set @str = '$I10~TESTING1$XYZ$I10~TESTING2$ABZ$I10~TESTING4'

    select @str1 = SUBSTRING(@str,CHARINDEX('$I10~',@str) +5,7)

    select @j-2 = ( LEN(@str)

    ...

    "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: Median Values in SSRS

    fliu2265 (10/26/2015)


    How to write a SQL query in SSRS expression?

    Something like = Select * from ...

    thanks

    You create a dataset, do your query there, then reference the value of the dataset...

    "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 Hot Jobs

    FYI Steve: this is a better link to the article:

    http://www.informationweek.com/it-life/15-hottest-it-jobs-for-2016/d/d-id/1322321

    What you posted is that link with "?image_number=1" at the end. That's the "first page of the list" and there is...

    "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: Median Values in SSRS

    One way to get around this is to calculate the median before it get's to SSRS. For example, say you are getting your data from a SQL Server Stored Procedure...

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

    First, I'm guessing that running the query with collate Latin1_General_CS_AS will be about three times faster than ignoring case sensitivity because you are returning more records. It's also worth noting...

    "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: Better way of finding date?

    Just to be clear: if @StartDate is November 28th, 2015 - you still want 11/6/2014? I think that's the case, just double-checking...

    This is a little cleaner:

    DECLARE @StartDate DATE =...

    "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: Retrieve String Between Two Delimiters for Multiple Occurences SQL Server

    Jeff Moden (10/25/2015)


    Alan.B (10/21/2015)


    My Hacked version of Jeff's splitter splits a string based on a delimiter that is longer than 1. I

    Just a suggestion and looking at the data, 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: Feeling exhausted, overworked and tired.

    I've been there. I was a DBA for about 5 years and worked in very different environments. It takes a tremendous amount of effort to be a good DBA; it...

    "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 running total script

    The Quirky Update method (that Luis and Drew poster links for) is a good way to go.

    It's also worth looking at Hidden RBAR: Triangular Joins[/url]. This article explains why...

    "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: Stripping part of a filename

    You have not explained the criteria (e.g. "I need the the number between the third and fourth underscore")...

    That said, the splitter referenced in my signature will do the trick....

    "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: Use of Ceiling

    This seems pretty simple but it would be helpful if you could include some sample data and the expected results. If you do that I'm confident that you'll get 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: Are the posted questions getting worse?

    anthony.green (10/19/2015)


    Jeff Moden (10/18/2015)


    I realize this post should probably be under "Jobs" but I thought I'd give the dedicated denizens of the thread first crack at it.

    Any "hybrid" DBAs 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: Are the posted questions getting worse?

    Andrew P (10/22/2015)


    Luis Cazares (10/22/2015)


    Andrew P (10/22/2015)


    RE: the answers in this thread

    You guys are joking, right? right guys? :blink:

    Now I'm not sure if I read the question correctly 😀

    Ahhh, 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: The Dangers of Travel

    I don't know how much that's happening Steve. I just read the article that you linked to and the update reads,

    "the Silver detention may be linked to an ongoing...

    "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 - 1,186 through 1,200 (of 2,458 total)