Operation Details
Description: Reads the details of a participant note.
Sterotype: ns
SQL
SELECT
  ParticipantNote.participantNoteID,
  ParticipantNote.participantID,
  ParticipantNote.recordStatus,
  Note.sensitivityCode,
  Note.notesText,
  Note.creationDateTime,
  Note.priorityCode,
  Users.fullName,
  Note.userName,
  Note.subjectText,
  ParticipantNote.noteID,
  ParticipantNote.versionNo
INTO
  :participantNoteID,
  :participantID,
  :recordStatus,
  :sensitivityCode,
  :notesText,
  :creationDateTime,
  :priorityCode,
  :fullname,
  :userName,
  :subjectText,
  :noteID,
  :versionNo 
FROM
  Note,
  ParticipantNote,
  Users 
WHERE ParticipantNote.participantNoteID = :participantNoteID 
  AND Note.noteID = ParticipantNote.noteID 
  AND Note.userName = Users.userName 

UNION ALL

SELECT
  ParticipantNote.participantNoteID,
  ParticipantNote.participantID,
  ParticipantNote.recordStatus,
  Note.sensitivityCode,
  Note.notesText,
  Note.creationDateTime,
  Note.priorityCode,
  ExternalUser.fullName,
  Note.userName,
  Note.subjectText,
  ParticipantNote.noteID,
  ParticipantNote.versionNo
FROM
  Note,
  ParticipantNote,
  ExternalUser 
WHERE ParticipantNote.participantNoteID = :participantNoteID 
  AND Note.noteID = ParticipantNote.noteID 
  AND Note.userName = ExternalUser.userName