Be able to search postcodes in query which do not contain a space

With the new HMRC gateway to submit online GA claims (very helpful, thank you!) I now run two queries before my finance colleague tries to submit the GA claim, to try to eliminate any errors. The two queries are those suggested by Blackbaud and they do work, in that they pick up a few of our donors who GA but are based overseas. However it does not pick up postcodes which do not contain a space (which create an error on the HMRC submission). If there was a function you could query on, this would help enormously as we are importing online donations in bulk at the moment and it relies on us looking down the column on the excel spreadsheet before imorting (human error means this is flawed). Thank you!

  • Guest
  • Nov 22 2013
  • Attach files
  • Guest commented
    March 05, 2019 12:04

    I know this is an old thread, but I wanted to add the way I've be able to search for postcodes with spaces. I've been querying using the different wildcards, * * for finding the space and ? to use instead of specific postcodes, for more details on wildcards this article is pretty handy, https://kb.blackbaud.com/articles/Article/46154

    If you use ?'s has values for the postcodes, using enough ?'s to cover the length of postcodes, like G22LW would be ????? and ML36AB would be ?????? and having the criteria for does not contain * * so it looks something like this:


    (Postcode equals ????

    OR Postcode equals ?????
    OR Postcode equals ??????)

    AND Postcode does not contain * *

     

    Having that criteria with the output of name and postcode has worked at showing me only accounts that have postcodes without spaces. I've added a screenshot of the criteria too. =)

     

    Hope this helps!