Forum Replies Created

Viewing 8 posts - 31 through 38 (of 38 total)

  • RE: Group By Price Ranges

    I spoke too soon, it doesn't work perfectly, each row is repeated for each price range, so I am getting 6 times as many rows as I expected when @PriceRange...

  • RE: Group By Price Ranges

    rbarryyoung (6/18/2008)


    OK, fair enough, I can see that is was not caught up to the changes that you were making.

    To answer your question then: from a performance standpoint, 2 different...

  • RE: Group By Price Ranges

    rbarryyoung (6/16/2008)


    I must be missing something, what is wrong with this?:

    SELECT SUM(Case When R1.price between 0 and 50 Then 1 Else 0 End) as [£0 to...

  • RE: Group By Price Ranges

    I have made a small addition to the price range table that is used in my join. I have manually created a range order field that serves 2 purposes. The...

  • RE: Group By Price Ranges

    Sergiy (6/16/2008)


    Did anybody of you guys hear about relational databases?

    Something about placing business rules into data, not into code?

    What if tomorrow some ranges will need to be changed?

    Can you customers...

  • RE: Group By Price Ranges

    This is what I have got working for returning the price range counts:

    SELECT Range,COUNT(DISTINCT(item)) AS Count

    FROM tblPriceRanges

    INNER JOIN dbo.item ON price >= RangeFrom AND price < RangeTo

    WHERE(@ManID IS NULL OR...

  • RE: Group By Price Ranges

    Hi Jason,

    I am giving it a go now, I will see how I get on.

    I am coding in ASP, hence putting the sorting in the stored procedure. I find...

  • RE: Group By Price Ranges

    @ Jason, you have started me off in an interesting read, thank you.

    @ Mark, that looks like a very good solution to me. Nice and compact.

    The aim of this is...

Viewing 8 posts - 31 through 38 (of 38 total)