As I do my update? to remove the *

Hi experts, I just pull data from Oracle to SQL server.
 I have a table with column names at the end of the value of each of the names I have a * for example:
 henry *
 luis *
 Anderson *
 cristian *

 As I do my update? to remove the *
enrique_aeoAsked:
Who is Participating?
 
David ToddSenior DBACommented:
Hi,

If you merely want to remove * that are somewhere in the data

update t
set name = replace( name, '*', '' )
from dbo.SomeTable t

HTH
  David
0
 
MisbahCommented:
update tablename set columname = substring(columname, 1, (len( columname ) -1 ))
0
 
LowfatspreadCommented:
update yourtable set name = ltrim(substring(name,1,charindex('*',name)-1))
where name like '%*'

if the * truely occurs at the end of the data...

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.