Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: RE: Comparing Decimal and CHAR columns

$
0
0
Author: rakesh17684
Posted: Thu Oct 20, 2016 7:46 am (GMT 5.5)

I get back

sqlcode: -420

sqlstate: 22018
Code:

SQL0420N  Invalid character found in a character string argument of the
function "DECIMAL".  SQLSTATE=22018


Code:
SQL0420N  Invalid character found in a character string argument of the function "DECIMAL


SQL used:
Code:

select * from ABCitm where COl1=CAST(COL2 as dec(17)) with ur;


Code:
COL1  COL2
123         123
31231    21312
345          345
53453    FEF313


result

Code:
COL1 COL2
123   123
345   345


Code'd for you
_________________
Rakesh


Viewing all articles
Browse latest Browse all 8500

Trending Articles