Re: Update Query Problem

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Update Query Problem
Date: 2005-12-13 17:43:55
Message-ID: 20051213174354.GA3143@kaufbach.delug.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

operationsengineer1(at)yahoo(dot)com <operationsengineer1(at)yahoo(dot)com> schrieb:

> 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

Try this:

UPDATE t_job_number
SET contract_id = 30
WHERE job_number_id = (select job_number_id from t_serial_number where
serial_number_id = 78);

I'm not sure if i understand you corrently...

HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-12-13 17:49:20 Re: Update Query Problem
Previous Message Jaime Casanova 2005-12-13 17:43:26 Re: Update Query Problem