I am using SQL Server 2008 R2. I have a table, EQUIPMENT, with a column MACADDRESS which is of type nvarchar(50).
I need to build a report that only includes valid mac addresses. This field sometimes contains “fake” mac addresses that were needed in the past.
All fake mac addresses contain invalid characters for a mac address. Valid characters are digits 0-9 and letters a-f or A-F. All valid mac address are 12 characters in length. I didn’t want to try to use regular expressions for a simple problem.
I knew there had to be a way to do this with “LIKE”.
My English teacher led me astray. Double negatives are useful!