I'm trying to do a conditional database update, I have a table with a boolean field "selected" which I use to flag if an item is selected (true-false).
When I need to reset selection, I have to set all record field "selected" to "false".
At the moment I do a for-next to set the field to all records, but it's really slow.
Is it possible to do an "update" query with sql? or any way to do this task more quickly?
Thanks.
Regards
Devin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to do a conditional database update, I have a table with a boolean field "selected" which I use to flag if an item is selected (true-false).
When I need to reset selection, I have to set all record field "selected" to "false".
At the moment I do a for-next to set the field to all records, but it's really slow.
Is it possible to do an "update" query with sql? or any way to do this task more quickly?
Thanks.
Regards
Devin
Found it!
you can create a ("SQLQuery") dataset and execute an "UPDATE" statement using SQLite syntax
my fault was I thogth only "SELECT" statement were possibly.
Hope this could be useful for others.
Best Regards
Devin
Thank you for your reply