Mike... most of the answer that I found is right here...
DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
then this gives you whether the two intersect:
SELECT CASE @g.STIntersects(@h)
WHEN 1 THEN '@g intersects @h'
ELSE '@g does not intersect @h'
So in my case, I'd declare the linestring to describe the flight, and then use STIntersects to see if it intersects a country's borders. Then I can add a buffer using STBuffer (so if the flight comes within 1000 meters of the border, it counts as a crossing), so something like
DECLARE @BufferSize INT = 1000;
I saw this old article by Seth Phelabaum... and it's tantalizingly close to what I want, but not quite it. It has states in the US, but I need all the countries of the world. (Or at least North, Central and South America).