STDistance() always returns null if the spatial reference IDs (SRIDs) of the geography instances do not match.
If STDistance() is used to determine distance between antipodal points, or consecutive points on opposite sides of the globe, as in the distance between POINT (0 0) and POINT (180 0), this method will return null.
Note: |
|---|
|
Methods on the geography data type that produce a metric return value will have different results based on the SRID of the instance used in the method. For more information on SRIDs, see Spatial Reference Identifiers (SRIDs).
|