How can I find out which rows have been deleted?

Test[Form]

New Member
Informix-SQL 7.32 with SE engine:I have a customer who deleted several rows from an SE table. (I'm not using transaction logging or audit). The table has a serial column. I would like to create an Ace report to print the missing serial columns. I tried the following quick and dirty report, but it didn't work!.. can you suggest a better way?\[code\]definevariable next_id integerend select tbl_id from tblorder by tbl_id {I'm ordering tbl_id because all the rows are periodically re-clustered} end {by an fk_id in order to group all rows belonging to the same customer}formaton every rowlet next_id = tbl_id + 1 after group of tbl_idif tbl_id + 1 <> next_id thenprint column 1, tbl_id + 1 using "######"end\[/code\]or maybe create a temporary table with an INT column containing sequential numbers from 1 to 5000 and do a select statement like:\[code\] SELECT tbl_id FROM tbl WHERE tbl_id NOT IN (SELECT tmp_int FROM tmp);\[/code\]or a select statement with HAVING, OUTER, etc.
 
Top