How to clear character is find first of string in SQL Server column? -


i'm beginner in sql server, have value in table column:

98123456789 54782012 

i want write query find first string if '98' true delete first string, example value this:

98123456789   ----> starts 98 start clear  result ====> 123456789 54782012      ----> not start 98 not clear result ===> 54782012 

how can write query purpose?

update [table] set column= case left(column, 2)   when '98' right(column,3)  else column end 

if column of integer type, replace right... cast(right(column,3) int)


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -