Forum Replies Created

Viewing 15 posts - 2,701 through 2,715 (of 3,348 total)

  • RE: How many partitions?

    Festeron (8/16/2010)


    It does care. Because if there is no data in one partition, then the result varies.

    That was my understanding, but the supplied answer seems to say that the function...

  • RE: How many partitions?

    Frankly, I never understand why people do take the considerate effort to assemble and submit a question, along with an explanation and some believable answer options, and then don't take...

  • RE: How many partitions?

    malleswarareddy_m (8/11/2010)I guessed correctly as 4.but i executed the script it is throwing error in the last statement.because group by is not there in the last statement.

    Based on visual inspection...

  • RE: Round up or down II

    That sounds like a very probably explanation to me.

    I've sent a mail to Steve, asking him to check and then fix this. Thanks, David!

  • RE: Round up or down II

    David Data (8/10/2010)


    But something went wrong with the Email version of the question, which was:

    What wiil (sic) be the result when running this code?

    By Hugo Kornelis

    &nbsp &nbsp &nbsp &nbsp ...

  • RE: Round up or down II

    shyamsri83 (8/10/2010)


    Hi,

    Very interesting question.

    But I cant understand the usage of the 'dot' in the line

    Set @result = Round(5/3.,1)

    Can you please explain.

    Regards,

    a.shyam

    Adding the dot is the easiest...

  • RE: Round up or down II

    Ronald Beuker (8/10/2010)


    H(o)i Hugo,

    Oeps, weer wat geleerd. 😉

    The precedence of decimal is higher than that of integer, so the result will be truncated to a decimal(7,6) value of 1.666666.

    This...

  • RE: Round up or down II

    ziangij (8/10/2010)


    thanks 🙂

    was always worried about such integer conversions... will now just add a dot to ensure that the conversion is correct...

    You're welcome.

    But please do realise that the code in...

  • RE: HAVING

    me_always (8/9/2010)


    Hi,

    Could not get the having clause ...

    can anyonce please explain?

    Sure - but such a broad question is too hard to answer (other than with a reference to Books...

  • RE: Data Type and Length

    Good question! When I first saw it, I thought there would be a very high percentage of correct answers since the confusing default lengths for character strings have already been...

  • RE: Going From Many Schemas To One Schema

    It's an interesting technique - but not one I would recommend!

    The simple version has this caveat: it works "as long as they share the same primary key and the shared...

  • RE: Deprecated Features

    Interesting question. Shame about the typos in the answer options, though - they almost made me miss the correct answer.

  • RE: Round up or down I

    mtillman-921105 (8/3/2010)


    Third, us humans don't think this way typically I don't believe (thus, the good main question here). Since SQL is our tool, we should dictate how it works...

  • RE: Round up or down I

    Open Minded (8/3/2010)


    It surprises me why round() acts like floor() when numbers are integers.

    That is not the case. ROUND() does not act like FLOOR().

    The "problem" here is the order or...

  • RE: Round up or down I

    cengland0 (8/3/2010)


    So you need to cast it like this?

    round(cast(5 as float) / cast(3 as float),1)

    As ziangij already says, casting one of the operands is sufficient. And if you do use...

Viewing 15 posts - 2,701 through 2,715 (of 3,348 total)