in this case, we wanted to match fields where the district field in table b contained things like "LAM2-OUTSIDETOWN" and we wanted to match that to fields in table a which only had "LAM2" in them. "INSTR" ("in string") is our friend:
- SELECT a.first, a.last, a.district, a.zip, b.zip, b.first, b.last, b.district
- FROM clerk_ballots a, lcv_members b
- WHERE a.first LIKE b.first
- AND b.last LIKE a.last
- AND INSTR(b.district, a.district)
You need to login to post a comment.