lundi 2 février 2015

Syntax error drivingdistance


I am new in sql and i am trying to get that works a subquery with pgr_drivingdistance and pgr_pointsaspolygon but i get the next error:



subqueries in FROM must to have an alias,for example, FROM (SELECT ...) [AS] foo.But in the code below the alias is di



Here is the code:



SELECT 1 as result,* FROM pgr_pointsaspolygon('SELECT id, ST_X(the_geom) AS x, ST_Y(the_geom) AS y FROM (
SELECT id,seq, id1 AS node, id2 AS edge, cost, the_geom FROM pgr_drivingdistance(
''''SELECT id, source, target, time_4 as cost FROM jaen'''',
1, 15, false, false
)as di
JOIN jaen_vertices_pgr pt
ON di.id1 = pt.id)');




Aucun commentaire:

Enregistrer un commentaire