Forum Replies Created

Viewing 15 posts - 10,816 through 10,830 (of 15,376 total)

  • RE: Please Help on Trailing spaces

    derek.colley (9/6/2012)


    Surely there's an argument here that string validation (to take one example) should be handled app-side anyway, so that your table only ever receives clean data?

    If not,...

  • RE: Please Help on Trailing spaces

    ScottPletcher (9/5/2012)


    It doesn't need a trigger because the data doesn't change, it just needs to be cleaned up.

    But the trigger DOES the clean up, which guarantees that (1) it occurs...

  • RE: rCTE vs LIKE for Hierarchy

    ariel_mlk (9/5/2012)


    Sean,

    Thanks for the input ! i'll get that done by tomorrow and come back to buzz you guys again =)

    hopefully i'll improve the procedure more than i expect it...

  • RE: Please Help on Trailing spaces

    ScottPletcher (9/5/2012)


    Sean Lange (9/5/2012)


    To me that is vastly better than using LTRIM/RTRIM on all subsequent queries!

    You certainly have a valid point. Not sure that adding an insert/update trigger on every...

  • RE: rCTE vs LIKE for Hierarchy

    ariel_mlk (9/5/2012)


    Sean,

    No offense taken at all ! right now the procedure that i copied here is the only one that uses it, i just did some copy paste of existing...

  • RE: Are the posted questions getting worse?

    L' Eomot Inversé (9/5/2012)


    Lynn Pettis (9/5/2012)


    Brandie Tarvin (9/5/2012)


    Lynn Pettis (9/5/2012)


    Brandie Tarvin (9/5/2012)


    Lynn Pettis (9/5/2012)


    Really finding it painful to not respond to jc and his responses, but I'm trying not to.

    Have...

  • RE: Please Help on Trailing spaces

    To me that is vastly better than using LTRIM/RTRIM on all subsequent queries!

    You certainly have a valid point. Not sure that adding an insert/update trigger on every table is the...

  • RE: rCTE vs LIKE for Hierarchy

    ariel_mlk (9/5/2012)


    ALTER FUNCTION [dbo].[SplitString]

    (

    @String VARCHAR(MAX),

    @Delimeter Char(1)

    )

    RETURNS @RtnValue TABLE

    (

    Value VARCHAR(100)

    )

    AS

    BEGIN

    DECLARE @Cnt INT

    SET @Cnt = 1

    WHILE (CHARINDEX(@Delimeter, @String) > 0)

    BEGIN

    INSERT INTO @RtnValue (Value)

    SELECT

    Data = ltrim(rtrim(Substring(@String,1,Charindex(@Delimeter,@String)-1)))...

  • RE: rCTE vs LIKE for Hierarchy

    ariel_mlk (9/5/2012)


    Sean,

    Sorry to not have posted that back in the first post, as i stated I though I was missing something obvious enough to discard ddl, i editted it...

  • RE: Learning SQL from Scratch

    It all comes down to want you want to do. You discussed a few things but never really said what you want to do. The best thing you can do...

  • RE: cursor error in a stored procedure.

    RBarryYoung (9/5/2012)


    Hmm, I just noticed what this is trying to do (thanks, Lowell!).

    Why on earth would you even want to do this? If a #temp still exists, it's because...

  • RE: cursor error in a stored procedure.

    qur7 (9/5/2012)


    i understand , but in this box.. because of the bad application code lot of temporary tables are not getting drop... from last month of so. i want to...

  • RE: Please Help on Trailing spaces

    You should use a trigger to trim the data during INSERTs and UPDATEs

    [/quote]

    I don't think I agree that you should just add a trigger to trim spaces but we can...

  • RE: rCTE vs LIKE for Hierarchy

    what first querie does is a like on Hierarchy column, what mine does is a rcte from ID to ParentID pretty much like BOL examples... what I really don't understand...

  • RE: rCTE vs LIKE for Hierarchy

    ariel_mlk (9/5/2012)


    Celko and Sean,

    Thanks for the responses, I'm sorry i don't think i was clear enough, what I have is something like

    ID ...

Viewing 15 posts - 10,816 through 10,830 (of 15,376 total)