I have a (simplified) table of results:
id | Result1 | Result2 | Progress
---------------------------------
1 | 1b | 3c | NULL
2 | 2c | 2a | NULL
3 | 3c | 2b | NULL
4 | P3 | 2c | NULL
5 | 2c | A | NULL
I would like to populate the Progress column based on the difference between the numeric part (always first character) of the Result1 and Result2 columns. If the first character of either result column isn't numeric the Progress column should be NULL.
So the results for the table above should be
3c - 1b = 2
2a - 2c = 0
2b - 3c = -1
2c - P3 = NULL
A - 2c = NULL
Thanks for your help.