Re: Urgent help needed- alias name in update statement - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Urgent help needed- alias name in update statement
Date
Msg-id 201003090626.36202.adrian.klaver@gmail.com
Whole thread Raw
In response to Urgent help needed- alias name in update statement  (venkatrao.b@tcs.com)
List pgsql-general
On Tuesday 09 March 2010 5:51:31 am venkatrao.b@tcs.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..
>

From here:
http://www.postgresql.org/docs/8.4/interactive/sql-update.html

"column

    The name of a column in table. The column name can be qualified with a
subfield name or array subscript, if needed. Do not include the table's name in
the specification of a target column — for example, UPDATE tab SET tab.col = 1
is invalid. "


--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Unexpected result from selecting an aliased but non-existing column called "name"
Next
From: Raymond O'Donnell
Date:
Subject: Re: Urgent help needed- alias name in update statement