Forum Replies Created

Viewing 15 posts - 1,831 through 1,845 (of 2,458 total)

  • RE: PatExclude8K

    Matthias Klรคy (11/28/2014)


    Hi Alan

    Thanks for this great function. One note:

    SELECT * FROM dbo.PatExclude8K('123# What?!... ', '[^a-z!?.]')

    returns hat?!...

    So it is case sensitive, contrary to your comment in the programmers notes. 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 2014 Tribal Awards

    Did not know that this existed. Very cool.

    "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: do you have a StripNonNumeric ITVF function?

    Eirikur Eiriksson (11/6/2014)


    :blush: just noticed, had several "versions", this one is no good

    ๐Ÿ˜Ž

    This guy here is slightly slower than the last (and fastest) version of PatExclude8K that you posted.

    ALTER...

    "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: do you have a StripNonNumeric ITVF function?

    Eirikur Eiriksson (11/6/2014)


    Alan.B (11/4/2014)


    Taking this one step further... Why not just replace PatExclude8K with PatReplace8k() ?:w00t:

    I like the idea, tinkered a little bit with the code and got the average...

    "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: Creating missing records....

    Unless I'm not understanding what you are doing you can just use ISNULL to deal with the NULLs like this:

    ISNULL (<value>, 0)

    "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: Integration Services for Dummies type book/resource?

    You can start here: Stairway to Integration Services[/url]. I like all the stairways but this one is particularly good.

    I just finished reading:

    Microsoft SQL Server 2012 Integration Services

    which 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: Parsing out a Data String with Text Delimeters

    Here's a function that should do the trick:

    CREATE FUNCTION dbo.SubstringBetween

    (

    @string varchar(1000),

    @searchString1 varchar(20),

    @searchString2 varchar(20)

    )

    /*

    -- example:

    DECLARE

    @string varchar(100) = '[atc1.123/atc2.456/atc3.789/atc4.xyz/]',

    @searchString1 varchar(20) = 'atc2',

    @searchString2 varchar(20) = 'atc3';

    SELECT newstring

    FROM dbo.SubstringBetween(@string,@searchString1,@searchString2);

    */

    RETURNS TABLE AS...

    "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: String splitter function for mutli-char delimeters

    emph. mine

    g.britton (11/5/2014)


    Luis Cazares (11/5/2014)


    Note that those functions aren't intended for multi-character delimiters.

    Well....a multi-character delimiter is just a simple pattern without wildcards. So even though that's not the design...

    "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: String splitter function for mutli-char delimeters

    g.britton (11/5/2014)


    I've been using Jeff Moden's excellent Tally OH splitter for a while

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    In the comments it says:

    Optimized for single character delimiter. Multi-character delimiters should be resolved externally from 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: do you have a StripNonNumeric ITVF function?

    Taking this one step further... Why not just replace PatExclude8K with PatReplace8k() ?:w00t:

    I had to use logic from earlier in the thread but what about this for starters:

    CREATE FUNCTION...

    "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: do you have a StripNonNumeric ITVF function?

    Eirikur Eiriksson (11/4/2014)


    Just dawned on me, kind of a deja vu, here is around six years old thread on the same subject.

    ๐Ÿ˜Ž

    I read through this thread - very interesting...

    Got me...

    "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: do you have a StripNonNumeric ITVF function?

    Eirikur Eiriksson (11/3/2014)


    Adding a little bit of tinkering based on the operator cost results in the previous post, mainly changing from the CASE to a WHERE clause for filtering. 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: do you have a StripNonNumeric ITVF function?

    mister.magoo (11/4/2014)


    If you want a major duration boost, you can always slip Adam Machanic's "make_parallel" function into the mix and then you get some serious results...

    Adam's function : http://sqlblog.com/blogs/adam_machanic/archive/2013/07/11/next-level-parallel-plan-porcing.aspx

    In use...

    "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: Adding new filegroup to an existing partition scheme

    I figured it out.

    Using the DDL above I would...

    -- (1) Add new file group

    ALTER DATABASE temp2

    ADD FILEGROUP tp2fg6;

    GO

    -- (2) Create new file for the filegroup

    ALTER DATABASE...

    "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: good SQL Server dba books

    Ditto what was said thus far.

    ...and especially operational side of it(such as backup/restore, performance tuning, and security administration)

    I would add: Beginning SQL Server 2012 Administration ๐Ÿ˜‰

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