I am trying to concatenate two strings having space between them.The script below concatenates but it doesn't give any space between them.
UPDATE INS
set INS.UpdateBy = x.FNameTxt +''+''+''+ x.LNameTxt
From #Insured INS
Inner Join
(
select I.ModSystemUserId,SU.FNameTxt,SU.LNameTxt
from Insured I
inner join dbo.SystemUser SU
on I.ModSystemUserId = Su.SystemUserId
where I.InsuredId = @insuredId
) AS X
on INS.Insuredid =@insuredId
I am doing this INS.UpdateBy = x.FNameTxt +''+''+''+ x.LNameTxt
x.FNameTx = John
x.LNameTxt = Doe
result: JohnDoe i need space between them
Try this
UPDATE INS
set INS.UpdateBy = CONCAT(x.FNameTxt,' ',x.LNameTxt) ....
CONCAT(str1,str2,...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With