Forum Replies Created

Viewing 15 posts - 1 through 15 (of 651 total)

  • Reply To: The Order of Operations

    dale_berta wrote:

    What's "crazy" isn't the final sign. It's that SQL doesn't recognize unary minus. In math, and in every ordinary programming language I've ever encountered, unary operators have higher precedence...

  • Reply To: The Order of Operations

    I don't really understand the explanation. In what was is anything "crazy" about the handling of negatives? Whatever the precedence you end up dividing a negative by a negative, which...

  • Reply To: The Default NULL

    Rune Bivrin wrote:

    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...

  • Reply To: Ordering by Alias

    Thom A wrote:

    However, if it were a varchar, why would you be converting it to a varchar..? Style codes only affected when convert to or from a varchar fromΒ another data type....

  • Reply To: Ordering by Alias

    The answer depends on the data type of dbo.SalesHeader.OrderDate. If it's a datetime or similar then the answer is 6 as given. But if it's a varchar column then the...

  • Reply To: More Computed Column Indexes

    None of the answers is correct. You can index a computed column based on a float as long as it is persisted.

  • Reply To: The Datatimeoffset Value

    Ignoring the fact that the dates are a week apart πŸ˜‰

    I did a search before replying and that told me that Colorado is also on daylight savings time in May,...

  • RE: The Funny Stored Procedure Name

    Guessed right but for the wrong reason.
    Must admit, I don't quite see the point in teaching us about a feature that most of us have probably never heard of...

  • RE: Identity Property Fun

    Stewart "Arturius" Campbell - Thursday, January 10, 2019 12:09 AM

    Nice, easy question, thanks Steve

    Easy until I checked the documentation to "confirm" what...

  • RE: Short Variables

    Solomon Rutzky - Wednesday, December 5, 2018 9:23 AM

    But, even with both being deprecated, I don't see this "ability" being fully...

  • RE: Finding the database

    it also makes no attempt to validate the string you pass in, so
    SELECT PARSENAME('x.y.z', 3)
    will always return 'x'
    ie it's a simple string-parsing method.


  • RE: Thanksgiving Trivia

    also not so easy for anyone who answers based on the actual question πŸ˜‰

  • RE: Finding the Percentage

    Personally I would cast everything in sight to a decimal - implicit conversions are a complete pain, explicit casting will guarantee the correct result.

  • RE: QUOTENAME() Types

    I don't think that's the right answer. It always returns nvarchar - but if the input is invalid then the nvarchar value is NULL
    If you run 

  • RE: Creating Strings with Replicate

    Got this right as I was hit by it a while back. Still feels like a bug to me, but Microsoft say not so it can't be πŸ˜‰
     You have...

Viewing 15 posts - 1 through 15 (of 651 total)