Search code examples
geoserver

SQL View Query between multiple datastore table on GeoServer


I created multiple datastore in one workspace on GeoServer using sql server and i written SQL View query to access schema table for datastore it's working fine.

Select Longitude, Latitude, geometry::STGeomFromText('POINT(' +CAST(Longitude AS CHAR(20))+ ' ' + CAST(Latitude AS CHAR(20)) + ')',4326) as geometria from dbo.objectdata

But i need to access another datastore of same workspace in same sql view query means correlations between multiple datastore of same workspace by using single sql view query .

so how to write query to access multiple datastore table of sqlserver?

Thanks in advance.


Solution

  • SQL Views have no knowledge of GeoServer's workspaces or datastores. So, you can only access other tables in the database in the view. This works in exactly the same way as any other database view would.