Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

DynamicUpdateCommand - deleteAll

hi,

How is it possible to delete all records of a table in the DynamicUpdateCommand..

Is there also a possibility to use placeholders like %

set result = ActiveDocument.DynamicUpdateCommand("DELETE FROM Test WHERE col like 'abc%' ")

1 Reply
tanelry
Partner - Creator II
Partner - Creator II

There is no complete documentation about DynamicUpdateCommand so we just have to test to find out what works.

I have succeeded to delete all records by adding a dummy TRUE condition into a WHERE clause:

sub deletetest
SET Result = ActiveDocument.DynamicUpdateCommand("DELETE FROM Test WHERE -1")
if Result = false then
MsgBox Result.ErrorMessage
end if
end sub

Or if that makes more sense: "DELETE FROM Test WHERE 1=1"
Wink