SOQL – Contact Mailing Address

I am trying to run a SOQL query in the dev console to get resultant records where a Contact’s MailingStreet matches a particular LIKE query but can’t seem to get any results even when I know it ought to.

Example: MailingStreet is 1234 Fancy Road

Query: SELECT MailingStreet FROM Contact WHERE MailingStreet LIKE '%Fancy%'

However this yields nothing. Is there something special about the built-in MailingAddress compound field or how you need to query it?

If this should be done via SOSL instead, could someone offer an example?

Read more here: Source link