Frage

I have two tables.

Table a contains a list of names and locations (points) Table b contains a list of names and shape (polygons)

I want to write a query to find all points from a which are contained inside a given town from b

Something along the lines of

select name from tblshops where st_contains(select shape from tbltowns where name="London", location)

but I keep getting a syntax error. What am I doing wrong? Thanks

War es hilfreich?

Lösung

SELECT 
   name 
FROM 
   tblshops
WHERE 
   st_contains((select shape from tbltowns where name='London'), location)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top