Forum Replies Created

Viewing 15 posts - 166 through 180 (of 430 total)

  • RE: uses of string splitters

    Jeff Moden (6/4/2014)


    Luis Cazares (6/4/2014)


    sqldriver (6/4/2014)


    I didn't see this code in the initial capitalization thread. It's what I've been using happily for a couple years. Not sure how it compares...

  • RE: SubQuery not working

    I found this really helpful when dealing with a similar situation:

    [/url]

  • RE: uses of string splitters

    Luis Cazares (5/29/2014)


    Something like this?

    CREATE FUNCTION [dbo].[ProperCaseWithNumbers]

    (

    @StrIn VARCHAR(255)

    )

    RETURNS TABLE WITH SCHEMABINDING

    AS

    RETURN

    SELECT STUFF(

    ----Start of first parameter

    (SELECT CASE

    WHEN split.Item LIKE '%[0-9]%'

    THEN ' ' + split.Item

    ELSE ' ' + Upper(LEFT(split.Item, 1)) + Lower(Substring(split.Item,...

  • RE: UNION and INSERT

    mister.magoo (5/30/2014)


    It is probably because the presence of the UNION is removing duplicates, not just between the three queries but within the results of each query as well.

    :angry:

  • RE: UNION and INSERT

    Sean Lange (5/30/2014)


    sqldriver (5/30/2014)


    Sean Lange (5/30/2014)


    sqldriver (5/30/2014)

    I take no responsibility for repeatedly calling a function on an insert or using ISNUMERIC on a function like it's my birthday.

    LOL. Yes that...

  • RE: UNION and INSERT

    Sean Lange (5/30/2014)


    sqldriver (5/30/2014)

    I take no responsibility for repeatedly calling a function on an insert or using ISNUMERIC on a function like it's my birthday.

    LOL. Yes that is particularly horrible....

  • RE: UNION and INSERT

    Sean Lange (5/30/2014)


    sqldriver (5/30/2014)


    Hi,

    Just came across some weird legacy code in my system where an INSERT is followed by three UNIONs of the exact same query. What's the purpose of...

  • RE: Changes in full backup size

    Ah, fooey. Needed to keep the datediff between the two to seven for weekly backups. 😎

    SELECT t.database_name

    , t.backup_size

    ...

  • RE: Table scan paranoia

    Thanks Chris. I'll do some testing this week with that concept.

  • RE: Table scan paranoia

    Thanks Gail. That's the much smarter way of saying what I was thinking.

  • RE: Table scan paranoia

    sqldriver (5/9/2014)


    GilaMonster (5/9/2014)


    Tell the vendor to fix their garbage (politely). They probably don't have a clue about good indexes.

    If you can't drop or change indexes, how do you expect to...

  • RE: Table scan paranoia

    GilaMonster (5/9/2014)


    Tell the vendor to fix their garbage (politely). They probably don't have a clue about good indexes.

    If you can't drop or change indexes, how do you expect to tune...

  • RE: Table scan paranoia

    Sean Lange (5/9/2014)


    sqldriver (5/9/2014)


    I have a stored procedure hitting a 761969 row table and doing several table scans on it. It is indexed, as I'll show below. I can't get...

  • RE: Table scan paranoia

    GilaMonster (5/9/2014)


    Firstly, you have multiple redundant indexes on that table.

    Let's see...

    CREATE INDEX [IX_tbl_extr_items_Collection_Surr_Id_3E6F809B-F53A-48FC-81A1-E6F7504DF641] ON [dbo].[tbl_extr_items] ( [Collection_Surr_ID] ) INCLUDE ( [active]) WITH (FILLFACTOR=100, ONLINE=?, SORT_IN_TEMPDB=?);

    CREATE INDEX [Ind_collsurr_prostatus_item_computer_3E6F809B-F53A-48FC-81A1-E6F7504DF641] ON [dbo].[tbl_extr_items] (...

  • RE: How to find SPs with parallel plans? Really this simple?

    Best practice for MAXDOP is usually set to it to the number of physical cores in a NUMA node. How did you arrive at 5? Sorry if I missed something.

    When...

Viewing 15 posts - 166 through 180 (of 430 total)