Enter data in geography column in SQL Server management studio

ml123 picture ml123 · Dec 24, 2012 · Viewed 13.4k times · Source

I've created a new table in SQL Server Management Studio, which includes a Geography column. Now, I'm trying to enter data in this column using the SSMS UI, but I just can't find the right way of doing it.

So, how can that be done?

Answer

Bernhard Barker picture Bernhard Barker · Dec 25, 2012

I wouldn't think SSMS natively supports doing this with a nice interface (e.g. a map). Maybe there's some add-on to allow this, or likely some 3rd party app.

If you're happy with doing it in SQL, try this:

UPDATE tableName SET geographyColumn = geography::Point(47.65100, -122.34900, 4326)

Derived from here.

Here are 4 more ways to do the same.