%Concat meta-SQL element
Syntax
string1 %Concat string2
Description
At runtime, the %Concat
meta-SQL variable is replaced by the string concatenation operator
appropriate for the relational database management system (RDBMS)
being used. For example, on DB2, the %Concat meta-SQL variable is
replaced with CONCAT, while on SQL Server it's replaced with a +, and on Oracle
it’s replaced with ||.
This meta-SQL variable is supported with the same limitations as the native concatenation operator for the RDBMS where the meta-SQL is being executed. For example, some platforms enable you to concatenate a string with a numeric value; others flag this as an error. PeopleTools makes no attempt to check or convert the data types of either of the operands.
Note:
Concat is not available in COBOL, but the DYN-STMT-CONCAT field can be strung into dynamic COBOL strings to resolve into a platform-specific concatenation operator.
Example
Example 1:
SELECT LAST_NAME %Concat ',' %Concat FIRST_NAME FROM PS_EMPLOYEE
Example 2:
SELECT PORTAL_NAME
, PORTAL_LABEL
, %TrimSubstr(PORTAL_OBJNAME,1,30) %Concat ':' %Concat %TrimSubstr(PORTAL_NAME,1,30)
FROM PSPRSMDEFN
WHERE PORTAL_PRNTOBJNAME = 'CO_NAVIGATION_COLLECTIONS'
AND PORTAL_REFTYPE = 'F'