Collation and SQL_VARIANT

  • Wow, did I have to think on this one. Thanks for the interesting question.

    http://brittcluff.blogspot.com/

  • L' Eomot Inversé (11/1/2011)


    Excellent question.

    I wonder if there's another on sql_variant in the pipleline?

    Not at this stage, at least not by me. I was going to do one based on the weird sort order of SQL_VARIANT, but it's too obtuse even for me 😀

  • Britt Cluff (11/1/2011)


    Wow, did I have to think on this one. Thanks for the interesting question.

    Me too - and I wrote the thing (a month or so ago).

  • Only row 2 matches the explicit Latin1_General_CI_AS collation in the query.

    I see one row. Which is the other one?

  • Great question, I sure learned something new this morning.

  • Rich Weissler (11/1/2011)


    Only row 2 matches the explicit Latin1_General_CI_AS collation in the query.

    I see one row. Which is the other one?

    That's row number 2, not two rows.

  • Great question that made me think. Great explanation.

    Thanks,

    Matt

  • SQL Kiwi (11/1/2011)


    L' Eomot Inversé (11/1/2011)


    Excellent question.

    I wonder if there's another on sql_variant in the pipleline?

    Not at this stage, at least not by me. I was going to do one based on the weird sort order of SQL_VARIANT, but it's too obtuse even for me 😀

    That's the very one I was wondering about, as it seems a natural next question (as you've defined a UNIQUE constraint on a variant column, there must be a total order on SQL_variant to produce the index that supports that constraint. It's not really all that obtuse, if I remember the ordering rules correctly. In fact I'm tempted to ask that one myself if you are not going to. Or even ask two or three questions on it (on second thoughts, maybe that I'm contemplating two or three questions means it is a bit obtuse).

    Tom

  • cfradenburg (11/1/2011)That's row number 2, not two rows.

    Doh! That's clear as day now. Thank you! (Both for the answer, and the patience.) (I learned two things today! First, a little more about SQL_Variant. Second, don't try to comprehend the QotD answer before coffee.)

  • Very interesting question.

  • Thanks Kiwi! Another great great question that had me looking more closely at something I hadn't yet tinkered with too much. Cheers mate!

  • cool question

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Britt Cluff (11/1/2011)


    Wow, did I have to think on this one. Thanks for the interesting question.

    + 1 - Thanks

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Interesting stuff, thanks!

  • Nice one, thanks

    Iulian

Viewing 15 posts - 16 through 30 (of 41 total)

You must be logged in to reply to this topic. Login to reply