Fonction CONCAT postgresql

Résolu/Fermé
pcsystemd Messages postés 691 Date d'inscription dimanche 27 novembre 2005 Statut Membre Dernière intervention 15 janvier 2024 - 1 mars 2022 à 14:03
pcsystemd Messages postés 691 Date d'inscription dimanche 27 novembre 2005 Statut Membre Dernière intervention 15 janvier 2024 - 1 mars 2022 à 15:05
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 22805 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 23 mai 2024 1 469
1 mars 2022 à 14:17
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 691 Date d'inscription dimanche 27 novembre 2005 Statut Membre Dernière intervention 15 janvier 2024 22
1 mars 2022 à 15:05
Ah merci! Parfois je cherche le compliqué la ou c'est simple!
0