February 3, 2012 at 8:35 am
I liked this question, I happen to get it right because thinking of .Net is case sensitive and MS typically uses Proper Casing. What wonderous things you can do in SQL Server.
February 3, 2012 at 8:54 am
Thank you for an interesting question. I have never tried to use the new spatial features, but this has piqued my interest.
Also interesting nuance about case-sensitive database collation as well as case-sensitive syntax.
February 3, 2012 at 9:43 am
Very nice, off the beaten path - thanks, Michael!
February 3, 2012 at 10:08 am
Grr, I hate CS databases.
Note added to the question
February 3, 2012 at 12:01 pm
L' Eomot Inversé (2/3/2012)
so what is the correct case mixture? Presumably "geometry" going by Hugo's note, which seems to make SQL Server's type naming a bit inconsistent.
Yep, "geometry" (all lowercase) is correct.
I don't know why you think that is inconsistent. ALL data types have their official name in all lowercase:
SELECT name FROM sys.types WHERE name LIKE '%[A-Z]%' COLLATE Latin1_General_100_BIN2;
The only inconsistency is that for the true (non-CLR) system types, SQL Server allows mixed case even in case sensitive databases and on case sensitive instances, while it is not as forgiving for the CLR-implemented types (hierarchyid, gemoetry, geography).
February 3, 2012 at 12:17 pm
The only one that works is number 3. I left out a comma at first and none of them worked. when I realized it I had already answered none of them.:-(
February 3, 2012 at 2:04 pm
Hugo Kornelis (2/3/2012)
L' Eomot Inversé (2/3/2012)
so what is the correct case mixture? Presumably "geometry" going by Hugo's note, which seems to make SQL Server's type naming a bit inconsistent.
Yep, "geometry" (all lowercase) is correct.
I don't know why you think that is inconsistent. ALL data types have their official name in all lowercase:[/code]
The error message
Could not find method 'STLineFromtext' for type 'Microsoft.SqlServer.Types.SqlGeometry' in assembly 'Microsoft.SqlServer.Types'
seems to me to suggest that the final componenet of the type's fully qualified name is not "geometry" but "SqlGeometry"; dropping the "Sql" part of teh name is not unreasonable, but that leaves "Geometry" not "geometry". The type has two names (it's name in the collection, and its name in the T-SQL language, and it is not really consistent at all to have capital "G" in one and minisucule "g" in the other.
Tom
February 3, 2012 at 4:09 pm
I got this one right because I ran into the case sensitivity issue before. I don't use spatial data types often but I like questions and articles related to them. There are definitely some interesting things that you can do with these data types.
February 3, 2012 at 11:00 pm
great question 🙂 thank you
February 6, 2012 at 9:49 am
Nice - learned something today.
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
February 6, 2012 at 10:24 am
I was fooled by focusing on the 'geometry' type name, rather than on the method name.
Good question; hats off to Hugo for the excellent follow-up explanation.
I, too, am not a great fan of CS databases....
Rob Schripsema
Propack, Inc.
February 6, 2012 at 10:44 am
tks for the question
February 9, 2012 at 11:10 am
Process of elimination based on case sensitivity. It was still a lucky guess. Good question. Thanks for submitting.
http://brittcluff.blogspot.com/
Viewing 13 posts - 16 through 27 (of 27 total)
You must be logged in to reply to this topic. Login to reply