Hi I'm trying to do a simple update query based on a value in another column e.g
UPDATE tbl1 SET col2=1 WHERE col1 < 10
Where col1 contains the following values:
1,2,3....19,20,N1,N2...N9
But the query is bombing out when it hits a value with a non numeric char in it. I've tried:
UPDATE tbl1 SET col2=1 WHERE CAST(col1 AS UNSIGNED INT) < 10
Not surprisingly that didn't work either but I would have thought that in the first example when checking if N1 < 10 it would have ignored the row instead of failing...?
How could I do this?