Multiple UPDATES in the Firebird database [closed]

-3

Can I create a method that performs several updates in the Firebird database? For example, I want to update the following registry, but it would have to be one at a time, how to update otherwise?

UPDATE TVENPEDIDO SET NOTAFISCALSERVICO ='18593'WHERE CODIGO = '0000523'
UPDATE TVENPEDIDO SET NOTAFISCALSERVICO ='18594'WHERE CODIGO = '0000516'
UPDATE TVENPEDIDO SET NOTAFISCALSERVICO ='18595'WHERE CODIGO = '0000513'
UPDATE TVENPEDIDO SET NOTAFISCALSERVICO ='18596'WHERE CODIGO = '0000082'
UPDATE TVENPEDIDO SET NOTAFISCALSERVICO ='18597'WHERE CODIGO = '0000571'
    
asked by anonymous 04.12.2017 / 11:01

1 answer

3

Essentially it does not. There is nothing standardized in this code that can make it generic (there is no apparent criterion of what causes it), it is all individual. But if you can rewrite this code otherwise there might know to do something, but only you know it.

Just fear a code that does this, in general it is gambiarra since it deals with specific items literally. Unless the code is not this one.

    
04.12.2017 / 11:05