Matching columns - Using TRIM
Posted: Mon Jul 11, 2005 11:19 am
Hi All,
I have a input file which has CHAR(30) length column and i need to match this column with DB2 table CHAR(30) column to get the data, But the question is from the Input CHAR(30) i need to table only 28 char to match with table char values as the last 2 chars in input file has some value. So I am using Substring and Trim function to get 28 char from file and trying to match with Table CHAR(30) it is not able to match the record and rejecting all the records. Any thoughts!!!
Eg:-
From File CHAR(30) = 'ABCDEFG YZ'
From table CHAR(30) = 'ABCDEFG'
if i use Trim(Substrings("String", 1 ,28 ),' ', 'E')
Thanks in advance,
I have a input file which has CHAR(30) length column and i need to match this column with DB2 table CHAR(30) column to get the data, But the question is from the Input CHAR(30) i need to table only 28 char to match with table char values as the last 2 chars in input file has some value. So I am using Substring and Trim function to get 28 char from file and trying to match with Table CHAR(30) it is not able to match the record and rejecting all the records. Any thoughts!!!
Eg:-
From File CHAR(30) = 'ABCDEFG YZ'
From table CHAR(30) = 'ABCDEFG'
if i use Trim(Substrings("String", 1 ,28 ),' ', 'E')
Thanks in advance,