Forum Replies Created

Viewing 15 posts - 46 through 60 (of 97 total)

  • RE: REPLACE Multiple Spaces with One

    Woah, lots of great stuff coming in here. I can hardly keep up. I keep refreshing to make sure what i am about to say has not been said and...

  • RE: REPLACE Multiple Spaces with One

    Pieter-423357 (11/17/2009)


    Pretty good trick, but do you really want to subject each row to the triple REPLACE function?

    REPLACE is a costly function and will run for a good while...

  • RE: REPLACE Multiple Spaces with One

    My mind converted the OR to an AND since if you could use VARCHAR(MAX) then the first constraint about string length would not apply anyway.

  • RE: REPLACE Multiple Spaces with One

    Paul White (11/17/2009)


    SDM (11/17/2009)


    To the people who can program in a .NET language and recognise when to use it appropriately to complement T-SQL:

    Fixed that for ya! 😀

    SDM (11/17/2009)


    The OP...

  • RE: Code within separate IF/ELSE IF statements executed/parsed?

    Oh, I do the strangest things for fun. The DHTML stuff was mainly code theft so the fun bit was actually seeing the end result in action and now we...

  • RE: Code within separate IF/ELSE IF statements executed/parsed?

    Yes. Though I did not specifically mention so I was aiming to intimate that I was avoiding the dynamic where possible.

    Now for the fun stuff, the DHTML tooltip of the...

  • RE: Code within separate IF/ELSE IF statements executed/parsed?

    Yeah, makes sense.

    I have the union one in there anyway because I need to reference by same table name later on.

    It's basically for a wee html dashboard of jobs on...

  • RE: Methods For Converting a Stored Procedure

    First off. Nice article with a lot of things to think about.

    As mentioned in the previous couple of posts. A ConvertProcToFunction would, in a lot of cases be even handier....

  • RE: Concatenating Rows

    As a bit of a side bar, the REPLACE method is fine but only if you catch all the possible characters. For example, you missed "&" and a couple of...

  • RE: Concatenating Rows

    OK, so the code is about the same but I also inserted the data to a table which was cleared between statistics time toggling:

    --===== Do the testing in a nice...

  • RE: Concatenating Rows

    Oh, be careful...the code above will leave a trailing comma. The COALESCE (or ISNULL) not only removes null entries, its position in the concatenation formula prevents having a trailing comma.

    Oops,...

  • RE: Concatenating Rows

    Sigh, when will people learn to read before posting.

    You are NOT using coalesce to concatenate.

    in the example above, coalesce is used to remove NULL entries.

    The below works just the same...

  • RE: Concatenating Rows

    Jeff. Once again, greet work on the performance testing.

    I did a wee compare last night but do not have the results due to a bit of a power cut.

    Once character...

  • RE: Concatenating Rows

    Actually you dont have replace the invalid characters if you use the FOR XML Clause, with the TYPE directive. You can then use an xquery to extract the value as...

  • RE: Concatenating Rows

    Joel Mansford (10/14/2009)


    In my opinion the 'neatest' solution is to use a custom CLR aggregate function. Afterall this is an aggregate function. Happily MS provide a concatenate as...

Viewing 15 posts - 46 through 60 (of 97 total)