procedure Tdm.ClearToLatest;var AllDone : Boolean;begin tblData.DisableControls; try AllDone:=False; tblData.First; repeat tblData.Delete; AllDone:=tblData.RecordCount <= 1000; until AllDone; finally tblData.EnableControls; end;end;
tStr:='DELETE FROM tblData WHERE inDate <= date(''now'',''-2 day'')';
... but I got a bit more creative with searching and found this for a Query...Code: [Select] tStr:='DELETE FROM tblData WHERE inDate <= date(''now'',''-2 day'')';
Running the program for a few hours will result in about 10,000 records being gathered.
It would be nice to include the 1000-limit with the Date, but I can't find anything that relates to "Remaining Record Count" within SQLite3. So, no way I can tell it to stop at 1000, 5000 or whatever.
https://www.sqlite.org/lang_createtable.html#rowidExcept for WITHOUT ROWID tables, all rows within SQLite tables have a 64-bit signed integer key that uniquely identifies the row within its table. This integer is usually called the "rowid". The rowid value can be accessed using one of the special case-independent names "rowid", "oid", or "_rowid_" in place of a column name. If a table contains a user defined column named "rowid", "oid" or "_rowid_", then that name always refers the explicitly declared column and cannot be used to retrieve the integer rowid value.
as far as i understood right, you can use rvk's sql script without problem (with little mod)