DrSeussFreak
Programmer
Code:
SELECT Right(em_id, CharIndex(' ', Reverse(em_id) + ' ') - 1) em_id
FROM afm.em
This query was working until recently (someone changed some field types and they are now back to what they were before). em_id is a varchar(100) field.
the data looks like
Freak, Seuss D. 1234567489 OR
Freak, Seuss 123456789
I need to pull just the numbers and not the text.
Ideas?