>This sounds strange, Pablo, but try to reverse the order of what you are doing with SET DELETED OFF. Therefore, you do the DELETE, the REPLACE datetime, and then the TABLEUPDATE().
Yes John, really it sounded very strange for me, but you're right WORKS!
I put this code:
SELECT table1
SET DELETED OFF
DELETE
REPLACE dtdeleted WITH DATETIME()
SET DELETED ON
BEGIN TRANSACTION
...
And perfect! Many thanks for the tip, I think you must write a FAQ article for this.
Gracias