Forum Replies Created

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

  • Reply To: A NOT NULL Default

    Why would anyone want to turn off standard ANSI defaults? I thought these options were a legacy thing. Or is there some real reason to sue them still that I'm...

  • Reply To: Case expression with NULL

    The reason for the restriction is (I assume) that it needs some way of determining datatype. So this will also work:

    select case when 1=0 then cast(null as...
  • Reply To: More Conversion Questions

    I was looking for option 5, the developer who coded this is now looking for a new job 😉

  • Reply To: The Ranking Function

    Can anyone think of any real life examples where you'd want to rank over something non-unique?

  • Reply To: EXCEPT

    A very valid question I thought, but one that's more about NOLOCK than EXCEPT, and the explanation should have included the comments later added.

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

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