SOUNDS doesn't seem to accept wild cards. I can use SOUNDS and I can use CONTAINS but I haven't tried to use the others. SOUNDS has its limitations, some of which are "interesting" My wife's second name is "Marguerite" but it doesn't show in SOUNDS even when spelt out all the way. Also SOUNDS finds that some interesting names are the same. We humans wouldn't think they were even close, but SOUNDS finds them just fine.

ContactLookupName is used mostly for display purposes. It formats everything to eliminate errors in lookup up. Again using my wife, Marie Marguerite Claire Berry follows the traditional French Roman Catholic naming convention:

Marie Jesus' mother or Joseph Jesus' father is the first name
Second name is Godmother or Godfather to suit
Third name is the one you use. I use NIckName to specify the one to use. I could have called it NamePreferred, but here are me and my wife:

BERRY Laurence Albert (Al) -- (we arew lazy speakers in the Rocky Mountains)
BERRY Marie Marguerite Claire (Claire)

With 30 char per name I can put Marie Marguerite in ContactName1.

Albert


On 2016-09-12 7:16 AM, karentellef via RBASE-L wrote:
Wow, I haven't used "sounds" in a gazillion years, back to the DOS days. Think I
might play with it again!

But something you said interests me. You say that "contactlookupname" is a computed column concatenating all 4 names. Now THAT is something I never thought of doing! If someone wanted to type in a name, and have it search perhaps a company name but also a contact name, I would do a "company contains .vtext OR contact contains .vtext", as you say. But if there's a concatenation, then you can do a
contains against just one column.  I'm going to try this!

So since you have that concatenated column, why are you doing the "sounds"
against the separate pieces? Is it because the "sounds" doesn't work correctly
against the longer computed column?

Karen



-----Original Message-----
From: Albert Berry <[email protected]>
To: rbase-l <[email protected]>
Sent: Sun, Sep 11, 2016 11:19 pm
Subject: [RBASE-L] - My solution to awkward parishioner name searches

I am working up a useable search function to find parishioners.
This is how I got around the plethora of names in a Roman Catholic Parish
that dates back to 1896. Each of the input name spaces allows 30 characters.

There are many unusual spellings here. The coal miners came from virtually
every European country, and names are spelled every which way, so I used
the very useful function supplied by R:Base, the SOUNDEX "SOUNDS"
Here is my solution to the problem. It works very quickly. I started by using
"OR" but it was very slow.

My favourite spelling of them all is "Jorjia" - I don't think I could find it any other way.
*****************************************************************
SET ERROR MESSAGE 677 OFF
  DROP VIEW vwParishioners1
  DROP VIEW vwParishioners
  SET ERROR MESSAGE ON
-- ContactLookupName is computed to concatenate all four names with the
-- nickname in parentheses. Nickname is also useful as "usual name"
-- My wife's lookupname is BERRY Marie Marguerite Claire (Claire)
  CREATE VIEW vwParishioners1 +
(ContactID,ParishID,ContactSurName,ContactName1, ContactName2,+
      ContactNickName, ContactLookupName,ParishName) AS +
SELECT ContactID,OrganizationID,ContactSurName,ContactName1, ContactName2,+
ContactNickName,ContactLookupName,OrganizationName +
      FROM ContactOrganization t1, Contact t2,Organization t3 WHERE +
t1.ContactID = t2.ContactID AND t1.OrganizationID = t3.OrganizationID
  COMMENT ON VIEW vwParishioners1 is "
  CREATE VIEW vwParishioners  +
(ContactID,ParishID,ContactSurName,ContactName1, ContactName2,+
      ContactNickName, ContactLookupName,ParishName) AS +
    SELECT * FROM vwParishioners1 +
      WHERE ContactSurName SOUNDS "BERRY" +
      UNION SELECT * FROM vwParishioners1 +
          WHERE ContactName1 SOUNDS "BERRY" +
          UNION SELECT * FROM vwParishioners1 +
              WHERE ContactName2 SOUNDS "BERRY" +
              UNION SELECT * FROM vwParishioners1 +
                  WHERE ContactNickName SOUNDS "BERRY"
  RETURN
************************************************************************
--
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to