Problem UPDATE Statement - Mailing list pgsql-novice

From
Subject Problem UPDATE Statement
Date
Msg-id 20060104222918.29693.qmail@web33307.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Problem UPDATE Statement
List pgsql-novice
i'm trying to apply the following UPDATE statement:

UPDATE t_sn
SET t_sn.sn_completed = false
WHERE sn = 1
AND t_sn.link_id = t_link.link_id
AND t_link.job_id = t_job.job_id
AND t_job.product_id = t_product.product_id
AND t_product.product_id = 118

i get the following error:

ERROR:  missing FROM-clause entry for table "t_link"

i'm assigning the two values that i know (sn (serial
number) and product_id) and then i'm trying to connect
via my foreign/primary key definitions.  i have the
"logic" to this point.  i ahve some books, but they
tend to have simple examples - nothing like doing an
update and traversing across 4 tables to get the data
required (in my case - t_sn, t_link, t_job,
t_product).

i'm a little frustrated b/c my paradigm is obviously
wrong, but it isn't obvious to me what i'm doing
wrong.  it doesn't help that is a different error each
time, either.

as always, any help/guidance is greatly appreciated.



__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com


pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Re: Best way to manage users
Next
From:
Date:
Subject: Re: Best way to manage users