SELECT
communicationID,
concernRoleID,
typeCode,
proFormaVersionNo,
methodTypeCode,
incomingInd,
communicationDate,
statusCode,
correspondentName,
correspondentConcernRoleID,
correspondentTypeCode,
subjectText,
documentLocation,
documentRefNumber,
fileLocation,
fileReferenceNumber,
caseID,
ticketID,
userName,
comments,
communicationText,
addressID,
phoneNumberID,
emailAddressID,
proFormaID,
communicationStatus,
proFormaInd,
attachmentInd,
versionNo
INTO
:communicationID,
:concernRoleID,
:typeCode,
:proFormaVersionNo,
:methodTypeCode,
:incomingInd,
:communicationDate,
:statusCode,
:correspondentName,
:correspondentConcernRoleID,
:correspondentTypeCode,
:subjectText,
:documentLocation,
:documentRefNumber,
:fileLocation,
:fileReferenceNumber,
:caseID,
:ticketID,
:userName,
:comments,
:communicationText,
:addressID,
:phoneNumberID,
:emailAddressID,
:proFormaID,
:communicationStatus,
:proFormaInd,
:attachmentInd,
:versionNo
FROM
ConcernRoleCommunication
WHERE correspondentConcernRoleID = :concernRoleID
AND
(
:startDate IS NULL
OR communicationDate >= :startDate
)
AND
(
:endDate IS NULL
OR communicationDate <= :endDate
)
AND statusCode = :statusCode
AND communicationStatus = :communicationStatus
|