Subject | Check previous records in the table before table update |
---|---|
Author | kukiejko |
Post date | 2013-06-23T17:57:55Z |
Hello,
I use Firebird 2.5 for Windows.
I need to create UPDATE TRIGGER for Table A, but
UPDATE for the Table A for row ID=x is only possible if TIME column for ID<x is >not< [null]. For example I can update Time column for row ID=234 but it should be not possible to update Time column for row ID=235.
How can I do it on the Firebird server (using eg. Trigger, functions or procedures)?
--------------------------------------------
TABLE A:
ID | TIME
==========================================
229 | 07.06.2013, 18:06:35.871
230 | 07.06.2013, 16:42:52.941
231 | 07.06.2013, 16:42:53.286
233 | 07.06.2013, 16:42:53.607
234 | [null]
235 | [null]
236 | [null]
------------------------------------------
Thank you for any feedback or example
Kukiejko
I use Firebird 2.5 for Windows.
I need to create UPDATE TRIGGER for Table A, but
UPDATE for the Table A for row ID=x is only possible if TIME column for ID<x is >not< [null]. For example I can update Time column for row ID=234 but it should be not possible to update Time column for row ID=235.
How can I do it on the Firebird server (using eg. Trigger, functions or procedures)?
--------------------------------------------
TABLE A:
ID | TIME
==========================================
229 | 07.06.2013, 18:06:35.871
230 | 07.06.2013, 16:42:52.941
231 | 07.06.2013, 16:42:53.286
233 | 07.06.2013, 16:42:53.607
234 | [null]
235 | [null]
236 | [null]
------------------------------------------
Thank you for any feedback or example
Kukiejko