I tried to execute this query on my SQL Server 2008 R2 instance:

SET GEOG=geography::STPointFromText('POINT(0 90)', 4326);

SQL Server returned the following error:

System.FormatException: 24201: Latitude values must be between -90 and 90 degrees

I also tried POINT(0 89.99) and got the same error.

How do I set a point to be the North Pole?

  • SELECT geography::STPointFromText('POINT(0 90)', 4326) doesn't raise any errors for me. – Martin Smith Dec 23 '11 at 15:01
  • I've voted to close this as too localized because the problem isn't in the question at all. It's external to the data provided and specific to your configuration. – Evan Carroll Jun 22 '18 at 5:33

Try this instead, with (or without) decimal points

DECLARE @a geography
SET @a=geography::STPointFromText('POINT(0.0 90.0)', 4326)

if this works - then something wrong with the ITEMS table


Solved. the problem was raised by a trigger enabled on the table. the problem is that the trigger contain exactly the same code to update the GEOG field when GEO_LAT and LON field are updated... really strange but for now the problem is solved also without 0.0 and 90.0

Not the answer you're looking for? Browse other questions tagged or ask your own question.