Re: Help with query
От | Christian Hofmann |
---|---|
Тема | Re: Help with query |
Дата | |
Msg-id | 008301c61a9c$3537d670$9000a8c0@taschenrechner обсуждение исходный текст |
Ответ на | Re: Help with query ("A. Kretschmer" <andreas.kretschmer@schollglas.com>) |
Ответы |
Re: Help with query
|
Список | pgsql-novice |
Hello Andreas, > > Do you know how to solve this error? I need this column. > > normalize your table. But my tables are normalized. In the normal table there is only one state for a given project_no. So your queries would success. But the table we are talking about is a auditing table. It it logging all events that are going to the normal table. So it saves when a row is inserted, updated or deleted. When in the normal table the name for the project_no 1 is altered there will be also only one row. But in the auditing table (the one I am talking about) there will be one row for every update, insert or delete in the normal table. This is based on the documentation: http://www.postgresql.org/docs/8.1/static/plpgsql-trigger.html So the example table would be the emp_audit and the normal table the table emp. But whzen there is no other possibility I think I will have to fetch all the rows and do the logic which row is the right one in business logig? Thank you, Christian
В списке pgsql-novice по дате отправления: