Forum Replies Created

Viewing 15 posts - 556 through 570 (of 1,229 total)

  • RE: Comparing data row by row....

    Evil Kraig F (1/20/2012)


    ChrisM@home (1/20/2012)


    This breaks a 5-row set based on date then time, leaving 2 remaining valid 5-row sets in the 50-row seed data. The 3 islands-n-gaps queries yield...

  • RE: Comparing data row by row....

    Evil Kraig F (1/20/2012)


    ChrisM@home (1/20/2012)


    Evil Kraig F (1/20/2012)


    ChrisM@home (1/20/2012)


    - don't treat a problem as islands-n-gaps if it isn't, because whatever method you use to resolve it, it's going to cost...

  • RE: Comparing data row by row....

    Evil Kraig F (1/20/2012)


    ChrisM@home (1/20/2012)


    - don't treat a problem as islands-n-gaps if it isn't, because whatever method you use to resolve it, it's going to cost you.

    Chris,

    The only problem with...

  • RE: Comparing data row by row....

    It was worth spending a little time on this to compare island-n-gap resolution by conventional means against a rCTE method.

    Firstly, this thread isn't island-n-gaps because the sequence column is...

  • RE: Is there a more efficient alternative to WHILE LOOPS and CURSORS

    Evil Kraig F (1/19/2012)


    ChrisM@home (1/19/2012)


    Evil Kraig F (1/19/2012)


    s.njenga (1/18/2012)


    Your query is only referencing @introwno ones instead of referencing all rows in the staging table without having to loop through each...

  • RE: Is there a more efficient alternative to WHILE LOOPS and CURSORS

    Evil Kraig F (1/19/2012)


    s.njenga (1/18/2012)


    Your query is only referencing @introwno ones instead of referencing all rows in the staging table without having to loop through each row.

    If that's in reference...

  • RE: Are the posted questions getting worse?

    L' Eomot Inversé (1/18/2012)


    Jack Corbett (1/18/2012)


    I assume I'm not the only one who sees no content (well really only the word "content") in the body of today's featured...

  • RE: Is there a more efficient alternative to WHILE LOOPS and CURSORS

    Evil Kraig F (1/18/2012)


    Roughly sure this is what you need:

    You're missing an AND from the BETWEEN in the cross apply 😉

  • RE: Is there a more efficient alternative to WHILE LOOPS and CURSORS

    Evil Kraig F (1/18/2012)


    Ow, my head hurts wrapping around this logic. I'll have to come back to it, but for anyone looking for an easier read, here's the query...

  • RE: Dynamic SQL Error

    And next, for speed, convert this:

    + ' and CONVERT(varchar(4),RETAIL_SALES.YR) + Right(''0'' + CONVERT(varchar(3),RETAIL_SALES.MO),2) + CONVERT(varchar(1),RETAIL_SALES.WK) <= ''' + @EndDate + ''''

    to something like this:

    AND RETAIL_SALES.YR = YEAR(@EndDate ) etc

    which...

  • RE: Dynamic SQL Error

    jayw-1061726 (1/18/2012)


    I was missing the space. Thanks Chris.

    You're welcome, thanks for the feedback. Just out of curiosity, why are you using dynamic SQL for this? Is there a chunk of...

  • RE: Dynamic SQL Error

    Dave Ballantyne (1/18/2012)


    agreed sp_executesql should *always* be used. But quite why dynamic sql is even being used here is anyones guess 🙂

    I'd guess it's not the whole picture, Dave.

  • RE: Dynamic SQL Error

    It may be a missing space between the FROM and the WHERE.

    The easiest way to find out is to print the full string, copy and paste it into a...

  • RE: Help with Counts

    All yours Gus.

  • RE: Count Function

    jennigirl (1/18/2012)


    I was able to get the query results I need, but I am looking to now present the results as the total count of trouble tickets assigned to each...

Viewing 15 posts - 556 through 570 (of 1,229 total)