Hello

I have a query:

update A set...
 from B left join C on (C.col1=B.col1 and C.col2=A.col2)
where ...

which gives me an error:
ERROR:  invalid reference to FROM-clause entry for table "A"
HINT: There is an entry for table "A", but it cannot be referenced from this part of the query.

I found two solutions:
- table A self join 1:1 in "from" part of query,
- table C subqueries in "where" clause - not too comfortable, because I need col2 value several times.

Any other idea?

The database is PostgreSQL 8.1.5.

Regards,
Tomasz Myrta

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to