2014 Apr 12 6:02 AM
Looking for the help about using substring option in the join columns.
Like
Table1.Filed = substring (Table2.Field,1,10)
Thanks
Aneel
2014 Apr 12 6:17 AM
Hello Aneel,
Can you please elaborate what exactly is your requirement?
Regards,
Dnyanesh.
2014 Apr 12 6:17 AM
Hello Aneel,
Can you please elaborate what exactly is your requirement?
Regards,
Dnyanesh.
2014 Apr 12 8:09 AM
Hi Dnyanesh,
Actually I want to compare the two tables columns in the join condition.
First table's column data matches second table's column data with first 10 characters of column.
One column has 20 length and 2nd table column has 10 characters length.
1000000006BM22BMC2 = one column value
1000000006 = second column value.
i want to compare in the join only first 10 charecters.
2014 Apr 12 8:23 AM
Hi Aneel,
In that case you can follow the below approach.
Create an internal table of the same TYPE as your first internal table. Call it i_itab_dummy.
Data: lv_colval TYPE char10.
LOOP AT i_itab1 into w_itab1.
lv_colval = w_itab1-colvalue+0(10).
w_itab_dummy-colvallue = lv_colval.
APPEND w_itab_dummy TO i_itab_dummy.
ENDLOOP.
Populate all the data into the dummy internal table in the above fashion. Now you will have the required values, i.e. first 10 characters of the field you want in the dummy internal table.
Now you can use this dummy internal table in your query for INNER JOIN.
Regards,
Dnyanesh.
2014 Apr 14 9:29 AM
2014 Apr 14 9:48 AM
Please mark the answers that solve your problems as correct.