Let's suppose I have a table like this...
id | value
----------
1 | 4
2 | a8
3 | 13
4 | a2
5 | 7
So some numbers in the value have an "a" in front of them and others don't.
Now let's say I wanted to pull out anything higher than 6 - including any number with an "a" in front of it.
So a query that looked something like this (inserting some PHP that I know wouldn't work in SQL)
SELECT * FROM table WHERE str_replace("a","",value)>6;
The expected results should be...
id | value
----------
2 | a8
3 | 13
5 | 7
Please note that I don't want to actually get rid of the "a"s in the SQL table. The table should remain untouched. It's okay if the result back doesn't have the "a" in it, though.