Menu

Conditional Database Update

How to
devin
2020-07-15
2020-07-22
  • devin

    devin - 2020-07-15

    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

     
  • devin

    devin - 2020-07-16

    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

     
  • neuts-jl

    neuts-jl - 2020-07-22

    Thank you for your reply

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.