MySQL Remove first two characters of all fields
mysql, substring
Solution
Try
UPDATE d1
SET d1_val = SUBSTRING(d1_val, 3)
WHERE d1_val <> 'N/A'
Problem
I have some data that looks like this: ``` C:10 R:200 N/A E:3 N/A N:77 ``` I'm trying to remove the first two characters for each row, and skip the rows with `N/A` I've been trying to figure out how to do this with `SUBSTRING` but have had no luck. ``` UPDATE d1 SET d1_val = SUBSTRING(d1_val, 1, LENGTH(d1_val)2) ```