SELECT
CRAID.alternateID,
CR.concernRoleID,
CRAID.concernRoleAlternateID,
CRAID.typeCode,
CRAID.statusCode,
CRAID.startDate,
CRAID.endDate
INTO
:alternateID,
:concernRoleID,
:concernRoleAlternateID,
:typeCode,
:statusCode,
:startDate,
:endDate
FROM
ConcernRoleAlternateID CRAID,
CONCERNROLE CR
WHERE
CR.concernroleid <> :concernRoleID and
CRAID.concernRoleID = CR.concernRoleID and
CRAID.typeCode = :alternateIDType and
CRAID.statusCode = :statusCode and
CRAID.alternateID = :alternateID and
concernroletype in (Select concernroletype from concernrole where concernroleid= :concernRoleID)
|