Hi, A value is null in code_b field thats why result of this row getting Null. How I can get get actual data in a result.
create table #A (code_a char(10), code_b char(10), code_c char(10))
insert into #A values ('12345',Null,'ABC')
insert into #A values ('55555','999999999','ABCD')
Select code_a +cast('' as char(1))+
cast(code_b as char(9)) +
cast(code_c as char(9)) from #A
12345 Null ABC
isnull（cast(code_b as char(9)),'Null') +
Many Thanks & Best Regards, Hua Min
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?