Wednesday, February 12, 2020

Get NAME From DirPerson : Join tables are DirPerson, HcmWorker and CustTable

public void insert()
{
    DirPerson               dirPerson;
    HcmWorker               hcmWorker;
    CustTable               custTableLoc; 
 
    if(!this.TDC_DiggingCoordinator)
    {
       select Name from dirPerson
                      join hcmWorker
                          where hcmWorker.Person == dirPerson.RecId
                      join custTableLoc
                          where custTableLoc.AccountNum == this.CustAccount &&
                                  custTableLoc.DiggingCoordinator == hcmWorker.RecId;

       this.TDC_DiggingCoordinator  =  dirPerson.Name;
    }

No comments:

Post a Comment