In MySql, result of select CAST(\'sdgdg32aannx\' as DECIMAL) is 0, and result of select CAST(\'32aannx\' as DECIMAL) is 32.
select CAST(\'sdgdg32aannx\' as DECIMAL)
0
select CAST(\'32aannx\' as DECIMAL)
32