Select fields containing at least one non-space alphanumeric character

Posted by zzapper on Stack Overflow See other posts from Stack Overflow or by zzapper
Published on 2010-04-20T11:57:50Z Indexed on 2010/04/20 12:03 UTC
Read the original article Hit count: 217

Filed under:
|
|
|

(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?

© Stack Overflow or respective owner

Related posts about non

Related posts about null