INFOR.CONCAT2 through INFOR.CONCAT6
infor.concat2, infor.concat3, infor.concat4, infor.concat5 and infor.concat6 enable you to concatenate two to six properties, literals, or expressions together using a separator value. The number at the end of the function name determines the number of values that are concatenated.
The first parameter is the separator character string. Use single quotes around the value to signify a string literal.
The second parameter determines if the separator is used after the first value if the subsequent value in the string is NULL. Specify Y or y if the separator is used when the string that follows it is NULL.
The remaining parameters are the properties, literals, or expressions to concatenate. The concatenation values can be strings. If an integer property is used, then the value is converted to a string. If a date is used, then a datetime value is displayed in the results. Therefore, cast a date to a string to eliminate the time component. If a Boolean value is used, then the result is True or False.
Syntax
select infor.concat2('string','y',property1,property2)from dataobject
select infor.concat3('string','y',property1,property2,property3) from dataobject
select infor.concat4('string','y',property1,property2,property3,property4) from dataobject
select infor.concat5('string','y',property1,property2,property3,proper ty4,property5) from dataobject
select infor.concat6('string','y',property1,property2,property3,proper ty4,property5,property6) from dataobject
Examples
select infor.concat2('-','y',productid,productname) as productid_name from products
Result:
productid_name 12345-Pencil
23456-Pen
34567-Marker
select infor.concat6(',','y',street_address, apart ment_suite,city,state,country) as address from customer_address
Result:
address
1250 Sunrise Place, 410, Orlando, Florida, USA
5067 Main Street, Orlando, Florida, USA
4325 Atlantic Avenue, 30B, Orlando, Florida, USA
In this example notice that the comma separator between street and city is not used if the
apartment_suite
value is NULL.