My understanding from these MSDN pages ({CONCAT (Transact-SQL)}, {+ (String Concatenation) (Transact-SQL)} & {SET CONCAT_NULL_YIE LDS_NULL (Transact-SQL)}) is that the + will propagate NULLs, where the server's
My code, a (relevant) fraction of my View, is :
All records where
According to my understanding this should be the T-SQL equivalent of Access's :
The latter works but the former doesn't. Am I going mad or am I missing something?
CONCAT_NULL_YIE LDS_NULL property is set to ON as mine is, whereas CONCAT() will convert them implicitly to empty strings.My code, a (relevant) fraction of my View, is :
Code:
CONCAT(([Employees].[First Name]+' '),[Employees].[Surname]) AS [EmpFullName]
[Employees].[First Name] is NULL return no text. Those with values in both fields return the full name just as expected. The first CONCAT() parameter should be an empty string if [Employees].[First Name] is NULL or some text with a space on the end if not. Neither should stop the [Employees].[Surname] from getting into the result.According to my understanding this should be the T-SQL equivalent of Access's :
Code:
([Employees].[First Name]+' ') & [Employees].[Surname] AS [EmpFullName]
Comment