View Single Post

   
  #3 (permalink)  
Old 04-17-2008, 10:23 PM
Andreas Kretschmer
 
Posts: n/a
Default Re: Update Query Problem

operationsengineer1@yahoo.com <operationsengineer1@yahoo.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°

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote