dynamic SQL

From: davyd <davydky(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: dynamic SQL
Date: 2008-09-10 15:45:21
Message-ID: a354e4430809100845r4a85d789u535ef54ce9adb46a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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..

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adrian Klaver 2008-09-10 15:57:56 Re: [GENERAL] FW: How to upload data to postgres
Previous Message Markova, Nina 2008-09-10 15:27:58 Re: [GENERAL] FW: How to upload data to postgres