I want to to perform a STInteract using two tables and finding the intersections of the lines onto a given polygon. I have converted all the tables to have geometries for all. I am having a problem writing the query for this.
These are my two table
- HWY_Database = contains the lines
- POLY_Database = Polygon of interest
This is my script:
--visually checking if they intersect
SELECT GEOM FROM [dbo].[HWY_Database] where STFIPS = '04'
UNION ALL
SELECT NEATCELL FROM [dbo].[POLY_Database]
So I dont know how to write this so this what I Initially wrote:
--intersect Neatcell and GEOM
SELECT GEOM FROM [dbo].[HWY_Database] where STFIPS = '04'
Where GEOM.STIntersects(NEATCELL FROM [dbo].[POLY_Database])