[Parse_Row4] , Parse_Row2] ,
Case When [Parse_Row4] is not null Then [Parse_Row4] Else [Parse_Row2] End
create table #EE_TEST (Parse_ROW4 varchar(20), Parse_ROW2 varchar(20))
insert #EE_TEST values (null,'2a')
insert #EE_TEST values ('4b','2b')
insert #EE_TEST values (' ','2c')
select Parse_ROW4, Parse_ROW2, len(Parse_ROW4) as Len_Parse_ROW4,
case when len(isnull(Parse_ROW4,'')) > 0 then Parse_ROW4 else Parse_ROW2 end as result
from #EE_TEST
Or, am I missing something else ? It almost sounds like it is only ever returning the TRUE condition, meaning Parse_ROW4 is never null.... In which case are there other conditions in you query that *might* be impacting your case condition.
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
Don't confuse empty strings as nulls. Possibly: Case When trim([Parse_Row4]) is not null
We'll need more information. Sample data and expected results would help a LOT!