03-31-2012 09:29 AM
When I do a lookup on E-mail Address using
starts with = a_
a list of ALL contacts starting with “a” is listed. Not just the four contacts I was after that matched the criteria.
I then performed Database Maintenance>Check & Repair>Integrity Check & Re-Index and reran the query with with the same result.
What is happening?
Thank you for a quick answer!
04-02-2012 06:36 AM
What is happening here is that in SQL the underscore character is used as a wildcard , so logically what the lookup is saying is "return all the email addresses that start with a and any other character". Apologies if this has been an inconvenience.
04-02-2012 06:44 AM
It shouldn't impact anything at all other than trying to do a lookup and the only other character that would exhibit this behavior would be the percent symbol.
04-02-2012 11:31 AM - edited 04-02-2012 11:34 AM
Turns out that the escape sequence for this character works in lookups just as it does in SQL, we have to surround the underscore in brackets so that the query will use the character it is, rather than the wildcard it's being interpreted as.
a[_] --> If you do a "starts with" lookup this will find all email addresses that begin with a_