I am trying to run the same script against SQL 2012 SERVER using SSMS (on Windows OS) and BSQLDB (on RHL Linux). The output for both these clients is different.
The script involves concatenation with null values. here is the simplified version of the script
--File: Test.SQL
declare @FirstValue varchar(50)
declare @SecondValue varchar(50)
set @FirstValue = null
set @SecondValue = 'TEST'
select @FirstValue + ' - Hello - ' + @SecondValue as Result
and the outputs are as below - SSMS
Result
-------------------------
NULL
(1 row(s) affected)
BSQLDB:
- Hello - TEST
How can I get a consistent result for both these clients.