I need to update a column which is defined as Decimal 9 with the data in a column which is Caracter 11.
The data in the character column is numeric and I have tried using DIGITS with the decimal column but it doesn't seem to like this. Suggestion please!
Assume that updates to the SALARY column are input through a window as a character string using comma as a decimal character (for example, the user inputs 21400,50). Once validated by the application, it is assigned to the host variable newsalary which is defined as CHAR(10).
UPDATE STAFF
SET SALARY = DECIMALnewsalary, 9, 2, ',')
WHERE ID = :empid;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.