Update rule on multiple tables fails?
| От | w fm3 |
|---|---|
| Тема | Update rule on multiple tables fails? |
| Дата | |
| Msg-id | BAY1-F1703Z4d5htAyD000014b8@hotmail.com обсуждение |
| Список | pgsql-novice |
Hi Could anyone let me know if I have done something wrong with the rule? As when trying to update via ODBC the update fails. Postgresql 7.3.2 1 view, joining 2 tables (1 - many, in this case- organisations and contacts- 'orgref' and 'conref' being the Primary keys) -- View definition looks like: SELECT contacts.conref, contacts.orgref, contacts.lastname, organisations.lob FROM (contacts LEFT JOIN organisations ON ((contacts.orgref = organisations.orgref ))); Rule looks like:..do instead... UPDATE contacts SET lastname = new.lastname WHERE (old.conref = contacts.conref ); UPDATE organisations SET lob = new.lob WHERE (old.orgref = organisations.orgref ); ); --- in this case trying to make changes to the lastname and lob fields. Many thanks _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
В списке pgsql-novice по дате отправления: