SELECT
Employment.employerConcernRoleID,
Employer.tradingName,
employerconcernrole.concernRoleType,
Employment.occupationType,
Employment.fromDate,
Employment.toDate,
Employment.status,
Employment.primaryCurrentInd,
Employment.employmentID,
Employment.versionNo,
Employer.versionNo
INTO
:employerConcernRoleID,
:employerName,
:employerType,
:occupationType,
:fromDate,
:toDate,
:status,
:primaryCurrentInd,
:employmentID,
:employmentVersionNo,
:employerVersionNo
FROM
Employment,
Employer,
ConcernRole employerconcernrole
WHERE Employment.concernRoleID = :concernRoleID
AND Employment.employerConcernRoleID = Employer.concernRoleID
AND employerconcernrole.concernRoleID = Employment.employerConcernRoleID
UNION
SELECT
Employment.employerConcernRoleID,
Representative.representativeName,
employerconcernrole.concernRoleType,
Employment.occupationType,
Employment.fromDate,
Employment.toDate,
Employment.status,
Employment.primaryCurrentInd,
Employment.employmentID,
Employment.versionNo,
Representative.versionNo
FROM
Employment,
Representative,
ConcernRole employerconcernrole
WHERE Employment.concernRoleID = :concernRoleID
AND Representative.concernRoleID = Employment.employerConcernRoleID
AND employerconcernrole.concernRoleID = Employment.employerConcernRoleID
|