Okay, I cannot figure out why the following code doesn't work as planned:
SELECT * FROM T_CONTRIBUTION WHERE NOTES LIKE '%[Anonymous gift]%'
For some reason, that command pulls records with all kinds of things in NOTES, but not the phrase I asked for. Is there some SQL syntax that the [ character signifies when used with the % wildcard? There should only be two records with [Anonymous gift] in the notes field, yet I get over 8500 records returned by the aforementioned command. WTH?
Thank you in advance for any help you may provide.
BONUS RAINY DAY TRIVIA: A rainbow can occur only when the sun is 40 degrees or less above the horizon.
Matt,
Yep, the [ and ] characters are used by LIKE to specify a range of characters to match. Here is a link that describes it better than I can:
http://msdn.microsoft.com/en-us/library/ms179859.aspx
David