Thread: UPDATE with concatenate

UPDATE with concatenate

From
Laurent Patureau
Date:
Hy,

I try to update a table:col with take the valueof this col and concatenate 
it with $val.
I don't want to select all value of table:col and addition $val at each one

I try :

UPDATE table SET col .= '$val'

But it doesn't work, any suggestion ?


pat



Re: UPDATE with concatenate

From
Stephan Szabo
Date:
Maybe this?
update table set col = col || '$val';

On Thu, 7 Jun 2001, Laurent Patureau wrote:

> Hy,
> 
> I try to update a table:col with take the valueof this col and concatenate 
> it with $val.
> I don't want to select all value of table:col and addition $val at each one
> 
> I try :
> 
> UPDATE table SET col .= '$val'
> 
> But it doesn't work, any suggestion ?



Re: UPDATE with concatenate

From
Rene Pijlman
Date:
lpatureau@idfr.net (Laurent Patureau) schreef:
>UPDATE table SET col .= '$val'

Try:
 UPDATE table set col = col || '$val'

http://www.postgresql.org/idocs/index.php?functions-string.html

-- 
Vriendelijke groet,
René Pijlman <rpijlman@spamcop.net>

Wat wil jij leren?
http://www.leren.nl/