ISINVALIDREASON() — Explains why a GEOGRAPHY polygon is invalid
ISINVALIDREASON( polygon )
The ISINVALIDREASON() function returns a text string explaining if the specified GEOGRAPHY value is valid or not and, if not, why not. The argument to the ISINVALIDREASON() function must be a GEOGRAPHY value describing a polygon. This function is especially useful when validating geospatial data.