Hi, I have an OQL select statement where I concatenate 2 string fields into 1 SELECT PERSON.Name Name, ‘’ + PERSON.Name + ‘ – ‘ + ADDRESS.City Account FROM Account.Person PERSON LEFT JOIN PERSON/Account.PersonAddress/Account.Address ADDRESS Person.name is filled in, address.city is empty. Then this line gives empty string on Account How can I fix this to show the concatenated string where the empty field is just ‘’? example: Person.Name = Steven then Account is Steven – example: Person.Name = Steven and Address.city = Antwerp then Account is Steven – Antwerp Kind regards, Steven Keersmaekers
asked
Steven Keersmaekers
1 answers
2
try something like this:
SELECT PERSON.Name + CASE WHEN ADDRESS/id = null then '' ELSE ' – ' + ADDRESS.City Account END AS ConcatenatedValue
FROM Account.Person PERSON
LEFT JOIN PERSON/Account.PersonAddress/Account.Address ADDRESS