Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)

  • RE: Running Total Query

    Thanks Guys !

    I ended up with something like this

    CREATE TABLE #TranType1(

    value int,

    TranDate datetime

    )

    CREATE TABLE #TranType2(

    value int,

    TranDate datetime

    )

    CREATE TABLE #TranType3(

    value int,

    TranDate datetime

    )

    INSERT INTO #TranType1

    SELECT 10,'2013-06-14'

    UNION

    SELECT 0,'2013-06-19'

    UNION

    SELECT 0,'2013-06-24'

    INSERT INTO #TranType2

    SELECT 0,'2013-06-26'

    UNION

    SELECT...

  • RE: rCTE vs LIKE for Hierarchy

    Duration is usually what I shoot for because that's all end-users can perceive or actually care about (other than accuracy, of course). I'll even use "extra resources" to improve the...

  • RE: rCTE vs LIKE for Hierarchy

    Alright guys,

    Jeff,

    If you don't think duration is a good enough indication of such things, then you can certainly run the code with SQL Profiler turned on.

    That's exactly my point,...

  • RE: rCTE vs LIKE for Hierarchy

    Jeff,

    Not only i'm new here as I'm new to SQL Server, but I've already read several of your posts, and others members of this community to be aware that when...

  • RE: How to insert empty row

    How are you generating this excel? via SQL? and getting it by file path to the web? what error are you seeing, exactly ? If you can manage to input...

  • RE: rCTE vs LIKE for Hierarchy

    I agree. Believe it or not, a While loop that does the same thing as the rCTE will work at least as fast and sometimes faster and with a heck...

  • RE: rCTE vs LIKE for Hierarchy

    Thanks for the replys, I've always linked IO reads to performance, so i was very confused when i saw a solution generating higher IO and still performing way better, yes...

  • RE: rCTE vs LIKE for Hierarchy

    1146 rows, which should not be a problem, but some procedures take up to 4 minutes to run with the like code, and that's pretty bad, my concern is that...

  • RE: rCTE vs LIKE for Hierarchy

    Sean,

    that would produce different results indeed, but the old code would expect ',367,' to work properly, i can't test it right now, but i assume that with those leading and...

  • RE: rCTE vs LIKE for Hierarchy

    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 to

  • RE: rCTE vs LIKE for Hierarchy

    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 code...

  • RE: rCTE vs LIKE for Hierarchy

    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)))

    SET...

  • RE: rCTE vs LIKE for Hierarchy

    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 with...

  • RE: Help Required

    I am looking for a sql code that will actually tell me, if I have my status changed the data gets updated if I run it.

    now, i could be...

  • RE: rCTE vs LIKE for Hierarchy

    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 - 1 through 15 (of 18 total)