Search code examples
sql-servervisual-studiosql-server-2005ado.netstrongly-typed-dataset

Concat Columns with NULL-values


I want to concat two Columns in the TableAdapter Wizard of the VS Dataset-Designer. The problem is that one column has NULL-Values and hence the concatination results in NULL regardless of the value of the other column. I've found out that i must SET CONCAT_NULL_YIELDS_NULL OFF, which is a Database option. How can i change this setting in a TableAdapter Query Builder? Is there an alternative?


Solution

  • Ok, i've solved it in the following way:

    tabSparePart.SparePartName + ' ' + ISNULL(tabSparePart.SparePartDescription, '') AS LongSparePartName