Topic: Truncate

Help

I am trying to delete all information within table before, replenishing it with new data.

I've tried using TRUNCATE at the beginning of the coding to empty my Table before replenishing, using an action button SQL QUERY (dtReportAssess = Table name)


          truncate Table dtReportAssess ;             

         


And have been getting an error.

          Error message;
          near "truncate" : synax error.


Any suggestions and any help would be great.

Re: Truncate

Hi,
Please see the attached - it probably does a bit more than you want but you could cut the basic code.
Derek.

Post's attachments

Attachment icon deletetables.zip 336.98 kb, 460 downloads since 2020-10-16 

Re: Truncate

https://www.tutorialspoint.com/sqlite/s … _table.htm

Re: Truncate

You can also add this query after deleting all records for it to function like truncate.

SQLExecute('DELETE FROM sqlite_sequence WHERE name="yourtablename"')
brian