timscronin
MIS
I have some data loaded from a mainframe looks like below
lastname firstname id
smith john 12
moris cal 13
The problem is there are what I thought were white spaces at the end of the names. I tried below on test table and with hardcoded white spaces and it worked. Tried it on my data and no work. My guess is there must be some special/hidden character in the data. ANy idea on if I can use what I have below with changes?
update mnfull
set lastname = SUBSTRING(laSTNAME,1,CHARINDEX(' ', lastname)-1)
lastname firstname id
smith john 12
moris cal 13
The problem is there are what I thought were white spaces at the end of the names. I tried below on test table and with hardcoded white spaces and it worked. Tried it on my data and no work. My guess is there must be some special/hidden character in the data. ANy idea on if I can use what I have below with changes?
update mnfull
set lastname = SUBSTRING(laSTNAME,1,CHARINDEX(' ', lastname)-1)