Skip to main content
Question

Check Formatting of Data in Field

  • May 23, 2019
  • 1 reply
  • 5 views

I am trying to check the Number of records that do not comply with std format (XX-XXXXXXX) within a specified field.

Any help is greatly appriciated !

1 reply

Hello,

in order to count the numer of cases that do not match a specific format, you can use the following formula:

SUM(CASE WHEN table.column LIKE __-_______ THEN 0.0 ELSE 1.0 END)

The _ (underscore) is a placeholder for exactly one placeholder.

I hope this solves your problem.

Cheers,

Florentin