<div><span style="font-family:courier new,monospace;">Hi All!</span></div><div> </div><div><span style="font-family:courier new,monospace;">I have tried to set a flag ('deleted' ) instead of actual record deletion, so I have tried to accomplish it with next piece of code in the trigger:</span></div><div> </div><div><div><span style="font-family:courier new,monospace;">BEGIN</span></div><div><span style="font-family:courier new,monospace;">/*</span></div><div><span style="font-family:courier new,monospace;">** Description: disable deletion of the rows from the table,</span></div><div><span style="font-family:courier new,monospace;">** instead we set .deleted flag to 1</span></div><div><span style="font-family:courier new,monospace;">*/</span></div><div> </div><span style="font-family:courier new,monospace;"> IF (TG_OP = 'DELETE') THEN</span><div><span style="font-family:courier new,monospace;"> UPDATE v.comps SET deleted = 1 WHERE v.comps.id = OLD.id;</span></div><div><span style="font-family:courier new,monospace;"> RETURN NULL;</span></div><div><span style="font-family:courier new,monospace;"> END IF;</span></div><div> </div><div><span style="font-family:courier new,monospace;">END;</span></div><div> </div><div> </div><div><span style="font-family:courier new,monospace;">DELETE row on the table v does not generate any error, but row still here and 'deleted' field has not been set to 1 as expected.</span></div><div><span style="font-family:courier new,monospace;">So, what I'm need to check ?</span></div><div> </div><div> </div><div> </div><div><span style="font-family:courier new,monospace;">TIA.</span></div><div> </div></div><div><span style="font-family:courier new,monospace;">-- </span></div><div><span style="font-family:courier new,monospace;">С уважением,<br />Ruslan R. Laishev</span></div><div><span style="font-family:courier new,monospace;">OpenVMS bigot, natural born system/network progger, C contractor.</span></div><div><span style="font-family:courier new,monospace;">+79013163222</span></div><div><span style="font-family:courier new,monospace;">+79910009922</span></div><div> </div>