0
votes

I'm trying to concatenate 2 fields (Name and Other names) into one variable. For example, if my name is Jeffrey and other name is Johnston the the result should be Jeffrey Johnston.

I have tried the following on PRE-TEXT-ITEM

BEGIN 
    :LOAN.NAME := ':LOAN.NAME :LOAN.OTHER_NAMES';
END;

BEGIN 
    :LOAN.NAME := :LOAN.NAME + ' ' + :LOAN.OTHER_NAMES;
END;

When trying the following code

BEGIN 
    :LOAN.NAME := :LOAN.NAME + ' ' + :LOAN.OTHER_NAMES;
END;

I received this error message:

FRM-40735: PRE-TEXT-ITEM trigger raised unhandled exception ORA-06502

1
The Oracle symbol for the concatenation operator is || (two pipe symbols), not +. That should be pretty much all you need. - mathguy
@mathguy thanks! This works great. - Jeffrey Johnston

1 Answers

2
votes

You should use ||

BEGIN 
    :LOAN.NAME := :LOAN.NAME || ' ' || :LOAN.OTHER_NAMES;
END;