I need to convert a character string using DB2 SQL into a decimal (11,2). This character string has a sign also. I tried using Decimal verb and it gives ++++++++ sign after converting.
Appreciate help.
Example
input:
SUBSTR SUBSTR
110006 0000000000{
110011 0000000000{
110016 0000000000{
110020 0000000893H
110071 0000000000{
Query:
select substr(varlenfld, 18, 13),
decimal(substr(varlenfld,229,11),11,2) from
library/filename f
output:
SUBSTR DECIMAL
110006 +++++++++++++++
110011 +++++++++++++++
110016 +++++++++++++++
110020 +++++++++++++++
110071 +++++++++++++++