I have customer database that we use for auto-charges. It would appear that the CC expiration field has a couple records with invalid entries for expiration date... for example non-numeric. Is there a way to search for entries with a NON-Numeric value? Below is the start of how I would assume the query would look...
select *
from customers
where ccexperiation = non numeric
Thanks.
This is the way: SELECT * FROM TABLE_NAME WHERE NOT REGEXP_LIKE(COLUMN_NAME, '^-?[0-9.]+$ '); This also excludes values which contain decimals.
In SQL Server, we can use the ISNUMERIC() function to return numeric values from a column. We can alternatively run a separate query to return all values that contain numeric data.
select *
from customers
where ISNUMERIC(ccexperiation) = 0
With some minor caveats. See here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With