I have a log table which I have to clean up a bit because it is growing very fast. While deleting some historical data I reached count zero for that condition on which I have deleted the entries. 5 minutes later I check again (hit f5) and there are some old entries (50). I commented every known function in the application which adds records to this table and entries are still popping out.
Using
SELECT sql FROM sys.syscacheobjects where sql like '%Table_name%', I found one insert query but I don't know how or where it is being executed from.
Looking at the where clause of the insert string I think it might be a stored procedure?
values (@0, @1, null, @2, null, null, @3, @4, @5, @6, @7)
select [TableId] from [dbo].[Table] where @@ROWCOUNT > 0