>Hi, > >CURRENTLEVELS is set as a integer >BARCODENUMBER is set as a VarChar(13) as that is the max number of a barcode >STOCKCONTROLYN is set to >VarChar(1) as it is is either 1 or 0 > >And yes > >UPDATE ProductTable >SET CurrentLevels = CurrentLevels - '<value>' >WHERE BarcodeNumber = '<AnotherValue>' > AND StockControlYN = '1' > >That is what I want to do but Firebird is not happy is this function not >supported in Firebird?
Just remove the hyphens around <value>, Andy, and it should work: CurrentLevels - <value> is supported, whereas CurrentLevels - '<value>' isn't - Firebird doesn't allow subtracting a string from an integer and - probably unlike the other databases you mentioned - requires you to correct your query rather than silently assume that you want the string to be treated as if it was an integer. HTH, Set
