| From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Cc: | venkatrao(dot)b(at)tcs(dot)com, pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Urgent help needed- alias name in update statement |
| Date: | 2010-03-09 14:26:35 |
| Message-ID: | 201003090626.36202.adrian.klaver@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-novice |
On Tuesday 09 March 2010 5:51:31 am 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..
>
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(dot)klaver(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Raymond O'Donnell | 2010-03-09 14:27:20 | Re: Urgent help needed- alias name in update statement |
| Previous Message | Adrian Klaver | 2010-03-09 14:21:08 | Re: Unexpected result from selecting an aliased but non-existing column called "name" |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Raymond O'Donnell | 2010-03-09 14:27:20 | Re: Urgent help needed- alias name in update statement |
| Previous Message | Steve T | 2010-03-09 14:03:47 | Re: Urgent help needed- alias name in update statement |