Fonction CONCAT postgresql

Résolu
pcsystemd Messages postés 734 Statut Membre -  
pcsystemd Messages postés 734 Statut Membre -
Bonjour,

Je souhaiterais connaitre comme faire la requête ci-dessous en utilisant la fonction CONCAT.

select 'update table set gtm='||gtm||',geo_d=point'||geo_d||' where id='||id||' and geo_d is null;' from table where geo_d is not null;


Merci
A voir également:

2 réponses

yg_be Messages postés 24281 Statut Contributeur Ambassadeur 1 584
 
bonjour,
peut-être:
select 
concat ( 'update table set gtm=', gtm, ',geo_d=point', geo_d, ' where id=', id,
          ' and geo_d is null;')
 from table where geo_d is not null;
1
pcsystemd Messages postés 734 Statut Membre 23
 
Ah merci! Parfois je cherche le compliqué la ou c'est simple!
0