Operation Details
Description: Returns the list of all existing legal actions for a legal category except legal actions those already associated with legal category.
Sterotype: nsmulti
SQL
SELECT
  ADMINLEGALACTION.LEGALACTIONID,
  ADMINLEGALACTION.LEGALACTIONNAMECODE,
  ADMINLEGALACTION.STARTDATE,
  ADMINLEGALACTION.ENDDATE,
  ADMINLEGALACTION.MULTIPLEPARTICIPANTSIND,
  ADMINLEGALACTION.STARTEDEVENT,
  ADMINLEGALACTION.COMPLETEDEVENT,
  ADMINLEGALACTION.COMMENTS
INTO
  :legalActionID,
  :legalActionNameCode,
  :startDate,
  :endDate,
  :multipleParticipantsInd,
  :startedEvent,
  :completedEvent,
  :comments 
FROM
  ADMINLEGALACTION 
WHERE ADMINLEGALACTION.ENDDATE IS NULL 
  AND ADMINLEGALACTION.LEGALACTIONID NOT IN 
  ( 
  SELECT
    ADMINLEGALACTIONLINK.LEGALACTIONID 
  FROM
    ADMINLEGALACTIONLINK,
    ADMINLEGALACTIONCATEGORY 
  WHERE ADMINLEGALACTIONCATEGORY.LEGALACTIONCATEGORYID = ADMINLEGALACTIONLINK.LEGALACTIONCATEGORYID 
    AND ADMINLEGALACTIONLINK.LEGALACTIONCATEGORYID = :legalActionCategoryID 
  )