>>>REPLICATE(' ',10-LEN(ALLTRIM(REFERENCE))) >>>...
>>>String is too long to fit. >>>If I change the 10 in the above REPLICATE with 15, no error. >>>REPLICATE(' ',15-LEN(ALLTRIM(REFERENCE))) >>>Just a thought (hope nobody elese in the thread below also has already mentioned it)