Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server - Mismatch in column datatype and tessellation scheme

I'm trying to create an index on my Location column in the DB.

Receiving this error: Mismatch in column datatype and tessellation scheme

It's a simple Geography computed field of a Latitude and Longitude field.

[Location]  AS ([geography]::Point([Latitude],[Longitude],(4326))) PERSISTED,

What am I doing wrong here?

In my app I'm filtering heavily on this Location column so I want to make sure it's indexed.

enter image description here

like image 456
aherrick Avatar asked Jul 31 '15 01:07

aherrick


1 Answers

I had the same issue. Click the "Spatial" Column on the left and under the "General" section, where it says Tessellation Scheme, select "Geography Grid". It is defaulted to Geometry which is causing the issue.

enter image description here

like image 172
Michael Bondi Avatar answered Sep 28 '22 02:09

Michael Bondi