Re: Update Query Problem
| От | Jaime Casanova |
|---|---|
| Тема | Re: Update Query Problem |
| Дата | |
| Msg-id | c2d9e70e0512130943g5686929qa658c666b8d63fac@mail.gmail.com обсуждение исходный текст |
| Ответ на | Update Query Problem (<operationsengineer1@yahoo.com>) |
| Список | pgsql-novice |
On 12/13/05, operationsengineer1@yahoo.com
<operationsengineer1@yahoo.com> wrote:
> the following update query...
>
> UPDATE t_job_number
> SET contract_id = 30
> WHERE t_serial_number.serial_number_id = 78
> AND t_serial_number.job_number_id =
> t_job_number.job_number_id
>
> yields the following chastisement...
>
> ERROR: missing FROM-clause entry for table
> "t_serial_number"
>
> can anyone point in the right direction? requiring a
> from clause in this update seems a little bizarre to
> me - so i'm sure i've botched something up pretty
> good.
>
> tia...
>
UPDATE t_job_number SET contract_id = 30
WHERE job_number_id IN (SELECT job_number_id
FROM t_serial_number
WHERE serial_number_id = 78);
or add a FROM clause to the update
--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)
В списке pgsql-novice по дате отправления: