Re: Problème de concatenation

From: philippe dhondt <philippe(dot)dhondt(at)tele2(dot)be>
To: Ludovic Levesque <luddic(at)gmail(dot)com>
Cc: postgresql <pgsql-fr-generale(at)postgresql(dot)org>
Subject: Re: Problème de concatenation
Date: 2008-09-23 13:26:47
Message-ID: 1222176407.10027.3.camel@ibm1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale


Bien vu !

le premier enregistrement envoyé contenait bel et bien un NULL.

Merci à tous et bonne après-midi.

Philippe

Le mardi 23 septembre 2008 à 14:56 +0200, Ludovic Levesque a écrit :
> 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
> >

In response to

Browse pgsql-fr-generale by date

  From Date Subject
Next Message BPascal 2008-09-29 08:09:51 pgadmin 4.2 redhat en local
Previous Message Guillaume Lelarge 2008-09-23 12:58:59 Re: Problème de concatenation