Re: Urgent help needed- alias name in update statement

From: Steve T <steve(at)retsol(dot)co(dot)uk>
To: venkatrao(dot)b(at)tcs(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Urgent help needed- alias name in update statement
Date: 2010-03-09 14:03:47
Message-ID: 1268143427.2186.122.camel@retsol6400
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Venkat
Shouldn't the expression have an 'as'?

IE
UPDATE mytable AS x
SET x.name = 'asdf'
WHERE x.no = 1

On Tue, 2010-03-09 at 19:21 +0530, venkatrao(dot)b(at)tcs(dot)com wrote:

>
> Hello,
>
> In postgre, when i am trying to give alias name in update statement
> like below -
> ---------------------------------
> update mytable x
> set x.name = 'asdf'
> where x.no = 1
> -------------------------------
>
>
> is giving error - mytable is not having col x.
>
> We have migrated code from oracle to postgre 8.4. Is there any
> solution for this.
> (functions were compiled without any compilation errors - now when we
> are trying to run these we are getting problems)
>
> Please help..
>
> Venkat
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>

Steve Tucknott
ReTSol Ltd

DDI: 01323 488548

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-03-09 14:21:08 Re: Unexpected result from selecting an aliased but non-existing column called "name"
Previous Message venkatrao.b 2010-03-09 13:51:31 Urgent help needed- alias name in update statement

Browse pgsql-novice by date

  From Date Subject
Next Message Adrian Klaver 2010-03-09 14:26:35 Re: Urgent help needed- alias name in update statement
Previous Message venkatrao.b 2010-03-09 13:51:31 Urgent help needed- alias name in update statement