Operation Details
Description: Retrieves a list of active employment details for the specified concern role.
Sterotype: nsmulti
SQL
SELECT
  Employment.employerConcernRoleID,
  Employer.tradingName,
  employerconcernrole.concernRoleType,
  Employment.occupationType,
  employerconcernrole.primaryAlternateID,
  Employment.fromDate,
  Employment.toDate,
  Employment.status,
  Employment.primaryCurrentInd,
  Employment.employmentID,
  Employment.versionNo,
  Employer.versionNo
INTO
  :employerConcernRoleID,
  :employerName,
  :employerType,
  :occupationType,
  :alternateID,
  :fromDate,
  :toDate,
  :status,
  :primaryCurrentInd,
  :employmentID,
  :employmentVersionNo,
  :employerVersionNo 
FROM
  Employment,
  Employer,
  ConcernRole employerconcernrole 
WHERE Employment.concernRoleID = :concernRoleID 
  AND Employment.status = :status 
  AND Employment.employerConcernRoleID = Employer.concernRoleID 
  AND employerconcernrole.concernRoleID = Employment.employerConcernRoleID 

UNION
  
SELECT
  Employment.employerConcernRoleID,
  Representative.representativeName,
  employerconcernrole.concernRoleType,
  Employment.occupationType,
  employerconcernrole.primaryAlternateID,
  Employment.fromDate,
  Employment.toDate,
  Employment.status,
  Employment.primaryCurrentInd,
  Employment.employmentID,
  Employment.versionNo,
  Representative.versionNo 
FROM
  Employment,
  Representative,
  ConcernRole employerconcernrole 
WHERE Employment.concernRoleID = :concernRoleID 
  AND Employment.status = :status 
  AND Representative.concernRoleID = Employment.employerConcernRoleID 
  AND employerconcernrole.concernRoleID = Employment.employerConcernRoleID