Wednesday, September 10, 2008

[ADMIN] dynamic SQL

Hi list,
I need to create a sql where the name of a tabla is on a variable..

vbuffer        varchar;

SELECT     buffer
INTO     vbuffer
FROM     rutas r, unidades u
WHERE    r.codigo_ruta = u.codigo_ruta AND
u.codigo_uni = 'B15_AFF666';
   

SELECT within(the_geom,(SELECT geomunion(the_geom) from var vbuffer)) as inside

Thanks..

No comments: