%Concat Meta-SQL in PeopleCode

No votes yet

%Concat resolves to the database-specific concatenation operator so you don't have to guess which way it is done.

The following PeopleCode uses the %Concat meta-sql meta-variable:

SELECT INSTRUCTOR, FIRST_NAME %Concat ' ' %Concat LAST_NAME
FROM %Table(PSU_INSTR_TBL)

On SQL Server, this code resolves to:
SELECT INSTRUCTOR, FIRST_NAME + ' ' + LAST_NAME
FROM PS_PSU_INSTR_TBL

On Oracle, this code resolves to:
On SQL Server, this code resolves to:
SELECT INSTRUCTOR, FIRST_NAME || ' ' || LAST_NAME
FROM PS_PSU_INSTR_TBL

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!