I have a table where as codes are present in the form of 78,7244,d345 by default few records are found where the codes are start with 0072 .
I have to delete starting two number (00) from all codes wherever its present in column.
CodePudding user response:
You could test for it like:
select
case
when code like '00%'
then right(code,len(code)-2)
else code end AS Code
from YourTable