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 ;)