Concat attributes as string

Hi,

I would like to concatenate attributes like

RETURN a.x + ',' + a.y

The problem is when y doesn't exist it returns null:

a.x + ',' + null - returns null instead of a.x

Any idea why it works this way and how to correctly concat attributes ?

Regards,
Cezary

Hi Cezary,

try RETURN COALESCE(a.x ,"") + ',' + COALESCE(a.y ,"")

Regards
Vivek

1 Like

Hi Vivek,

Thank you :) it works!

Best,
Cezary

Or make a list: RETURN [a.x, a.y] AS vals
Result will be with square brackets, null values will be shown as null