• I think that the Soundexe column is derived from the company name because in a Stored Procedure used later, the following SQL is executed:

    SELECT DISTINCT C.COMPANYNAME, CS.SOUNDEXE, D.COMPANYNAME, D.SALESREPID, YEAR(ORDERDATE) AS YR

    FROM COMMISSION_SOUNDEX CS LEFT JOIN

    DISCOUNT D ON CS.COMPANYNAME=D.COMPANYNAME JOIN

    COMPANY C ON C.COMPANYNAME LIKE ('%' + CS.SOUNDEXE + '%') JOIN

    CUSTOMER CU ON C.COMPANYID=CU.COMPANYID LEFT JOIN

    ORDERS O ON CU.CUSTOMERID=O.CUSTOMERID

    WHERE CS.LEFTON=0 AND CS.RIGHTON=1

    AND ORDERDATE IS NOT NULL

    There are several iterations of this logic with the following changes:

    COMPANY C ON C.COMPANYNAME LIKE ('%' + CS.SOUNDEXE) JOIN

    WHERE CS.LEFTON=1 AND CS.RIGHTON=0

    and so on. (Notice the % is only on the Left side now, and the query is looking for 'lefton' = 1.)

    So, it is being used to find companies which are spelled similarly. The newly found 'companies' are placed in a temp table which must be reviewed by a human to determine if the newly found company is indeed a branch of the company. (All of this is used to calculate commissions.)