Dear all,

We'd like to use a parameter value in the SQL query to filter a linked 
table.

SET @WHERE_CODE='44109';

DROP TABLE IF EXISTS DATA_POSTGRES;
CREATE FORCE LINKED TABLE DATA_POSTGRES 
('org.orbisgis.postgis_jts_osgi.Driver', 'jdbc:postgresql_h2://....', 
'login', 'pass', 'db', '(SELECT * POSTGRES_TABLE WHERE CODE=@WHERE_CODE)');

Because the SQL instruction is a String type, the parameter value is not 
interpreted.


Can you give me some advice to solve this issue ? What about an expression 
instead of a String to express the query ?

Best regards.

-- 
Erwan Bocher
---------------------------------------------
Ingénieur de Recherche CNRS,
Laboratoire Lab-STICC – CNRS UMR 6285
Equipe DECIDE
UNIVERSITÉ DE BRETAGNE-SUD
Institut Universitaire de Technologie de Vannes
8, Rue Montaigne - BP 561 56017 Vannes Cedex
T: +33 2 97 62 64 92
W: https://cv.archives-ouvertes.fr/erwan-bocher
W: http://www.univ-ubs.fr


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to