Select fields containing at least one non-space alphanumeric character
- by zzapper
(Sorry I know this is an old chestnut; I have found similar answers here but not an exact answer)
These are frequent hand written queries from a console so I is what I am looking for is the easiest thing to type
SELECT * FROM tbl_loyalty_card WHERE CUSTOMER_ID REGEXP "[0-9A-Z]";
or
SELECT * FROM tbl_loyalty_card WHERE LENGTH(CUSTOMER_ID) >0; -- could match spaces
Do you have anything quicker to type even if it's QAD?