DECLARE @A geometry = 'POLYGON((0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0), (7 8, 13 8, 10 16, 7 8))';
DECLARE @B geometry = 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))'

So, A and B look like this:

If I understand you correctly, you want to find the edges of A that intersect B. So, you first identify the edges of A using STBoundary(), and then use STIntersection() to determine those that intersect B, like this:

SELECT @A.STBoundary().STIntersection(@B);

Which gives the following: Is this what you wanted?:

Beginning Spatial with SQL Server
http://www.apress.com/book/view/1430218290