SQLite, check if TEXT field has any alphabetical chars in it SQLite, check if TEXT field has any alphabetical chars in it sqlite sqlite

SQLite, check if TEXT field has any alphabetical chars in it


You can use GLOB in SQLite with a range to single them out:

SELECT * FROM MY_TABLEWHERE num GLOB '*[A-Za-z]*'

See it in use with this fiddle: http://sqlfiddle.com/#!7/4bc21/10

For example, for these records:

   num----------1234567890098765432110000000001000A000001000B000001000c00000

GLOB '*[A-Za-z]*' will return these three:

   num----------1000A000001000B000001000c00000

You can then translate that to the appropriate DELETE:

DELETE FROM MY_TABLEWHERE num GLOB '*[A-Za-z]*'