SELECT
ConcernRole.concernRoleID,
ConcernRole.concernRoleName,
ProviderParty.providerConcernRoleID,
ProviderParty.providerPartyID,
ProviderParty.startDate,
ProviderParty.endDate,
ProviderParty.category,
ProviderParty.type,
ProviderParty.position,
ProviderBackgroundCheck.result,
ProviderParty.recordStatus
INTO
:concernRoleID,
:concernRoleName,
:providerConcernRoleID,
:providerPartyID,
:startDate,
:endDate,
:category,
:type,
:position,
:result,
:recordStatus
FROM
ProviderParty
INNER JOIN
ConcernRole
ON
ProviderParty.partyConcernRoleID=ConcernRole.concernRoleID
AND
ProviderParty.providerConcernRoleID=:providerConcernRoleID
AND
ProviderParty.category like :category
AND
ProviderParty.recordstatus like :recordStatus
LEFT OUTER JOIN ProviderBackgroundCheck
ON
ProviderParty.providerPartyID=ProviderBackgroundCheck.providerPartyID
AND
ProviderBackgroundCheck.recordstatus like :recordStatus
ORDER BY ConcernRole.concernRoleID
|