Forum Replies Created

Viewing 15 posts - 76 through 90 (of 233 total)

  • Reply To: Float Issues

    Jonathan AC Roberts wrote:

    Yes, a strange result. Try this:

    DECLARE @tmp1 FLOAT = 0.289;
    SELECT CONVERT(decimal(38,36),ROUND(@tmp1, 2)*100),
    CONVERT(decimal(38,36),ROUND(@tmp1, 2))*100

    Well, that's no more strange than any...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Float Issues

    Well, 29 would have been too easy, and the title of the QOTD hinted at the result not being quite the obvious. Casting to INT always truncates decimals, so it...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Float Issues

    Good one!

    The problem is that casting to int always removes any decimals, and with the example, 0.289 is actually stored as a value which, when converted with the maximum number...

    • This reply was modified 6 years, 4 months ago by Rune Bivrin.


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Renaming Columns

    Aaron N. Cutshall wrote:

    Option 1 works only if you replace the {} with [] as follows:

    df.columns = ['BillMonth', 'InvoiceAmount']

    True, dat! So, we're down to the missing alternative of "None", I suppose...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Renaming Columns

    richardmgreen1 wrote:

    Option 1 may well work, but in this instance, it's renaming the wrong field so is wrong for the question posted.

    (I know, I'm being really picky now).

    I really don't...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Renaming Columns

    richardmgreen1 wrote:

    Option one won't work as it's renaming the wrong field.

    Option one should work, shouldn't it, since it sets the name of all the columns, but uses the old name...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Renaming Columns

    I thought I wouldn't touch this question until it's been reviewed, but I couldn't resist.

    Clearly, option 3 wouldn't work, since the original column name is "BillingAmount", and not "BillAmount". In...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Sorting the Data Frame

    I'll defer answering until Steve has sorted this one out.


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: The Default NULL

    Well, unfortunately, the documentation is a bit off. The bit about the session settings is correct, which matches what I wrote.

    The bit about the database settings is incorrect. The correct...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: The Default NULL

    Not to nit-pick, but the option is actually called ANSI_NULL_DFLT_OFF, so technically, all the answers are incorrect.

    However, the database option is called ANSI_NULL_DEFAULT, which can be set to OFF or...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Printing Dates

    Looking at the available answers, the only logical response would be that it would fail, since all the other answers have both date and time that doesn't match the input...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: New statistics

    Hush! That's probably for an upcoming QotD...


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: Basic Functions

    Interesting that arguments are optional until the're used in the function.


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: SSMS or SSDT

    Evidently, I wrote much the same thing 4 years ago. 😛

    • This reply was modified 6 years, 11 months ago by Rune Bivrin.


    Just because you're right doesn't mean everybody else is wrong.

  • Reply To: SSMS or SSDT

    I'm gonna go all "Four Yorkshire-men" on this and comment that back in my day, we'd been glad for ISQL/W. We would use SAF in character mode and be happy!...


    Just because you're right doesn't mean everybody else is wrong.

Viewing 15 posts - 76 through 90 (of 233 total)