나는 HcmWorker 테이블에서 PersonnelNumber 필요하지만 수신하고 값이 LogisticsElectronicAddress에서 E 메일 주소입니다 -메일 주소? 그들은 동일한 형태의 입니다. HcmWorkerLogisticsElectronicAddress 및 HcmWorker 테이블을 연결하려면 어떻게해야합니까? 나는 E를 사용하여 PersonnelNumber을 찾을 수있는 가능한 연결/SQL 문이
0
A
답변
2
나는이 질문을 이해하기를 바랍니다.
LogisticsElectronicAddress는 RedcId 의해 LogisticsLocation 및 DirPartyTable너무 RecId 의해 테이블 DirPartyLocation LogisticsLocation 의해 관련된다.
그래서 노동자는 표 RecId와 DirPerson에 의해 DirPartyTable관련된 HcmWorker에 insered.
따라서 LogisticsElectronicAddress를 사용하는 경우 거꾸로 접근 할 수 있습니다. 이 코드 같은
봐 :
select LogisticsElectronicAddress
join LogisticsLocation
join DirPartyLocation
join DirPartyTable
join HcmWorker
join DirPerson // extended DirPartyTable
where LogisticsLocation.RecId == LogisticsElectronicAddress.Location
&& DirPartyLocation.Location == LogisticsLocation.RecId
&& DirPartyTable.RecId == DirPartyLocation.Party
&& DirPerson.RecId == DirPartyTable.RecId
&& HcmWorker.Person == DirPerson.RecId;
시도가 모든 관련 표 (관계, 필드, 값)를 참조하십시오. 별칭/고유하지 않은 값을 얻을 수 있으므로 조건을 추가하십시오 (Key-Index 참조).
즐기십시오!