From: | "Ludovic Levesque" <luddic(at)gmail(dot)com> |
---|---|
To: | "philippe dhondt" <philippe(dot)dhondt(at)tele2(dot)be> |
Cc: | postgresql <pgsql-fr-generale(at)postgresql(dot)org> |
Subject: | Re: Problème de concatenation |
Date: | 2008-09-23 12:56:50 |
Message-ID: | 162718d40809230556y7a8fbd75q41b09f93c1f251a1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg사설 토토SQL : Postg사설 |
Bonjour,
je pense que vA est quelque fois NULL et donc strquerry aussi:
SELECT NULL || ' test';
?column?
----------
[null]
Ludo
2008/9/23 philippe dhondt <philippe(dot)dhondt(at)tele2(dot)be>:
> Bonjour à toutes et tous,
>
> dans une fonction declenchée par un trigger j'ai 3 variables vA, vB &
> vC.
> On y effectue un calcul du style :
> vA := vB - vC;
>
> puis, on souhaite inserer vA dans une table :
> strquerry = 'INSERT INTO table_name (resultat, fieldA) VALUES (1, ' ||
> vA || ')';
> EXECUTE strquerry;
>
> ce qui me donne :
> cannot EXECUTE a null querrystring
>
> Pourtant, d'après ceci, la syntaxe paraît correcte
> http://www.postgresql.org/docs/8.3/static/functions-string.html#FUNCTIONS-STRING-SQL
>
> Une idée?
>
> Merci d'avance.
>
>
>
> --
> Sent via pgsql-fr-generale mailing list (pgsql-fr-generale(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-fr-generale
>
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2008-09-23 12:58:59 | Re: Problème de concatenation |
Previous Message | philippe dhondt | 2008-09-23 12:50:38 | Problème de concatenation |