I've got a table where identifiers(XXXXX-065-00) should match a division(65). I'd like to query all the rows that don't match.
The following SQL seems to work, but is there a better or more efficient way of doing this?
select id,division,identifier from table where identifier not REGEXP '.....-'+division+'-..'