As far as I remember I could do such update in MS SQL Server:
UPDATE MyTable SET MyValue = (IF SomeCondition THEN 1 ELSE 0 END)
or different way for update by using CASE:
UPDATE MyTable  SET MyValue  = (CASE WHEN SomeCondition1 THEN 1 ELSE 0 END)
Is any of this methods possible in Firebird? I've tried both ways but with no luck.
Thank开发者_Python百科s for answers.
Which version of FireBird are you using? I tested with 2.5 and the second one (using CASE) works as expected.
FireBird doesn't support IF statement in DSQL but you can use IIF internal function, ie following works too:
UPDATE MyTable SET MyValue = iif(SomeCondition, 1, 0)
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论