When i run this in my db2 udb v8.2.9:
select nr_rg || right('000' || rtrim(char(nr_seq)),3) from (select distinct nr_rg, nr_seq from ii.TB_INF_COMPLEMENTAR) temp1 > file.txt
to concatenate 2 columns in order to generate a positional file (1 8, 9 11) that will be imported by db2 main frame, it returns thousands of blank spaces after the eleventh caracter and makes the file very big, aprox 23gb. I've tried substr, rtrim, cast char, etc, etc.
PS. This happens when I run in db2 command line.
I would appreciate if someone could help me on this issue.
Thanks in advance.