Обсуждение: UPDATE with concatenate

Поиск
Список
Период
Сортировка

UPDATE with concatenate

От
Laurent Patureau
Дата:
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

От
Stephan Szabo
Дата:
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

От
Rene Pijlman
Дата:
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/