I've just started with SQL Server, coming from an Arcpy/ArcGIS/python geospatial background.
I've been searching for a while for the answer to this question but have only found examples for using STUnion
on two shapes.
I have 2 spatial tables, table 1 and table 2 in SQL Server.
Table 1 has some columns and a geometry column and multiple (000's) records.
Column A
Column B
Shape
Table 2 has some columns and a geometry column and multiple (000's) records.
Column C
Column D
Shape
I want to do the equivalent to the arcpy Union_analysis (http://pro.arcgis.com/en/pro-app/tool-reference/analysis/union.htm) where by I join the tables spatially and keep all the records from each and the fields from each table whether they intersect or not.
The table I end up with would have
Column A
Column B
Column C
Column D
Shape
Is there a method for doing this? Or do I have to do the union using python and transfer the result back to SQL Server.
Any suggestions helpful.