Mark Oppedahl

Results 4 comments of Mark Oppedahl

That's what the second parameter in the sample is doing -- passing in the text and creating the geography server-side. It returns the correct result for STIsValid, unlike passing in...

Some more information: It look like SQL Server's call to STIsValid returns whatever the geography object's internal _isValid is set to. If you create the geography in the sample client-side,...

MakeValid has a similar problem--SQL doesn't modifiy the geometry to make it valid if the internal _isValid is already true.

Here's a way to pass the geometry as a parameter and force the server to reevaluate isValid: ```SELECT geography::STGeomFromWKB(@1.STAsBinary(), 4236).STIsValid()``` Similarly, if you want MakeValid to work, it's ```SELECT geography::STGeomFromWKB(@1.STAsBinary(),...