We are running a unicode DB2 for JD Edwards. The CCSID is 13488. I am trying to create a view where we convert one of the alpha fields to a numeric field. We have nulls in some of the records,.so I am using SELECT IFNULL(INT (GLSBL),0) AS AB8, to convert the field. However, I am
not getting 0 for the null values, but ++++++++ instead. The info message says to use VARCHAR to convert. Can this be done and will it convert my alpha values to numeric and null values to 0?
It's difficult to say without seeing the error messages and the entire SELECT statement, but the '+++++++' indicates that a data mapping error occurred when running the INT function on GLSBL. The most likely cause is that the GLSBL column contains characters that cannot be converted to a numeric value, such as 'A' or '#'. The rows with those values need to be excluded from your SELECT statement.
Dig Deeper on iSeries SQL commands and statements
Create a host variable of the where in statement on the fly with dynamic SQL.
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...