Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 8,416 total)

  • RE: Are the posted questions getting worse?

    LutzM (9/19/2011)


    Are you aware that only single statement solutions are allowed? That eliminates the QU method since you can't even declare a variable. For the same reason (at least from...

  • RE: SQL Partition

    Evil Kraig F (9/19/2011)


    Paul, remember when I mentioned in that other thread that Partitioning seems to be a Level III item? 🙂

    Indeed. Perhaps we need more partitioning questions?

  • RE: total of sum

    daveriya (9/19/2011)


    nobody understand my prob here,i past my query also, the thing is in my query i need to calculate WAL, that is only value i need to display ,i...

  • RE: Are the posted questions getting worse?

    Chad Crawford (9/19/2011)


    I was having a hard time figuring out when/why a checkpoint would write out dirty log pages, but ended up closing my question when I found a...

  • RE: total of sum

    daveriya (9/19/2011)


    my question is after i do proportion .again i need to do sum of all proportion and i need to display in row how to do that

    This is one...

  • RE: total of sum

    Jeff Moden (9/19/2011)


    Although I'd normally agree about the "only ORDER BY can guarantee the order of the output) thing, I disagree about the "ORDER BY" in this case. Rollup...

  • RE: total of sum

    Jeff Moden (9/18/2011)


    "Unordered"... have you an example of when ROLLUP produces incorrectly ordered results?

    I don't need one: presentation order is never guaranteed unless there is an outer-scope ORDER BY clause....

  • RE: total of sum

    Jeff Moden (9/18/2011)


    Leveraging Paul's code from above, please note the replacement of ORDER BY with WITH ROLLUP in the following code...

    That produces the following (unordered) set:

    ...which doesn't seem to take...

  • RE: Please help me out this question?

    ALZDBA (9/18/2011)


    probably about the only thing missing to get a meaningful result is the product indication:

    The original specification calls for quantity, not total price (that's why I used COUNT in...

  • RE: Please help me out this question?

    Having said all that, writing cursor code is a pretty poor way to learn to use SQL Server. Once you have written the required solution using a loop or...

  • RE: Please help me out this question?

    pathuripr (9/17/2011)


    Question # 11: Create a loop to go through the products table ordered by productname . for each product give me the total quantity sold for each product...

  • RE: UDF error

    shatrughna (9/18/2011)


    Hi,

    If you want to write function then you need to do small changes in T-SQL.

    CREATE FUNCTION [dbo].[Total]

    (

    @Amt INT

    )

    RETURNS INT

    AS

    BEGIN

    DECLARE @TSUM INT

    SELECT @TSUM = SUM(@Amt)

    RETURN @TSUM

    END

    :blink: What would be...

  • RE: Are the posted questions getting worse?

    Tom.Thomson (9/17/2011)


    Yes, come on Jason - admit that the only reasonm you changed the U to an E was so that we wouldn't find your picture here.

    Now that makes much...

  • RE: Are the posted questions getting worse?

    Hey Steve,

    Six posts to go.

    Cheers.

  • RE: Are the posted questions getting worse?

    SQLRNNR (9/17/2011)


    I was fully expecting to see this thread over 30,000 by this time.

    Shouldn't it be Cirque Du SQLeil?

    http://www.cirquedusoleil.com

    No doubt it's been mentioned before...it just always jars my brain a...

Viewing 15 posts - 1,681 through 1,695 (of 8,416 total)