Re: Append text using Concat on an Update query

From: David Fetter <david(at)fetter(dot)org>
To: d <datenisis(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Append text using Concat on an Update query
Date: 2007-02-02 04:32:33
Message-ID: 20070202043233.GD3882@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 01, 2007 at 05:03:43PM -0800, d wrote:
> I'm trying to append new text on a field using the concat function.
>
> On the Set statement I use something like this:
>
> Set Field = Concat(Field,'ABC')

> And when I check the results 'ABC' wasn't appended to <Field>. What
> should I do to make it append?

The SQL standard syntax for this is,

Set Field = Field || 'ABC'

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2007-02-02 08:10:18 Re: How to allow users to log on only from my application not from pgadmin
Previous Message Gene 2007-02-02 04:14:40 Re: PostgreSQL/FireBird