Subscribe to this thread
Home - General / All posts - SQL for concatenating multiple fields with nulls
Mike Pelletier

2,065 post(s)
#28-Nov-22 19:06

Is there a way to use SQL to concatenate multiple string fields that may contain null values? The methods I've been able to come up with only work without nulls. See attached map file for examples and test data. Thanks.



620 post(s)
#28-Nov-22 20:00

SELECT Coalesce([field 1], '') + Coalesce([field 2], '') FROM [T]

Mike Pelletier

2,065 post(s)
#28-Nov-22 20:22

Many thanks Chris. Have an excellent evening :-)

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.