I'm executing the query bellow to intersect a soil layer with a polygon (a parcel) with no problem.I would like to replace the @parcel in the select statement with something like a sub-query. I was naive to think that putting a SELECT Shape from another layer would do the trick, but it fails.Any ideas?Thanks, ArnonDECLARE @parcel geometry
=geometry::STGeomFromText('POLYGON ((170018 1068876, <more coordinates>))',1);
SELECT Shape.STIntersection(@parcel)
FROM soils
WHERE Shape.STIntersects(@parcel)=1