I am using mySQL to query a field which would be LastName
. I am looking for any errors in the field such as any special characters or numbers. I am not terribly familiar with SQL so this has been a challenge so far. I have written simple statements with REGEXP
but I have run into some issues the REGEXP
i was using was:
SELECT LastName FROM `DB`.`PLANNAME` where LastName REGEXP '^([0-9])'
now this turned up results where numbers were the first character in the string and i realized that if anything was in the middle of the string that started with a letter this would not pick it out.
To be clear i just need to find the errors not write a code to clean them out.
Any help would be greatly appreciated
Thanks
Pete