Using SQL Server and Powerbuilder 2022 R2 build 2819, I found another bug:
If I have the following:
decimal ldec_value
long ll_id
ll_id = 1
ldec_value = 7.99
UPDATE my_table
SET my_old_price = CASE WHEN :ldec_value <> my_old_price then :ldec_value else my_old_price END
WHERE my_id = :ll_id;
..... You will get a SQL Server error: Conversion failed when converting the varchar value '7.990 ' to data type int.
WORKAROUND:
Hard cast the decimal values to numeric:
UPDATE my_table
SET my_old_price = CONVERT(numeric, (CASE WHEN CONVERT(numeric :ldec_value) <> my_old_price then CONVERT(numeric, :ldec_value) else my_old_price END))
WHERE my_id = :ll_id;
... I shouldn't have to encapsulate the datatypes. Powerbuilder should know that a decimal value is a numeric, not a character string!