SO_NO from one OH table is Decimal(8,0)
EOD4_TX value from D4 table is CHAR 250. with SO NO embedded in it from position 1 to 8.
I have to select various fields from both these tables and in the where clause I have to equate
How can this be achieved.
SELECT AA , BB,CC FROM DB2XXXI.OKTATD4 D4
WHERE DIGITS(OH.SO_NO) =
DIGITS(SUBSTR(SELECT EOD4_TX FROM DB2OMMI.OKTATD4),1,8)
But This doec not work ?? I even tried CAST but it didn't work out too