SELECT
Place.placeID,
Place.compartmentID,
Place.name,
Place.type,
Place.startDate,
Place.startDateTime,
Place.endDate,
Place.endDateTime,
Place.recordStatus,
Place.versionNo
INTO
:placeID,
:compartmentID,
:name,
:type,
:startDate,
:startDateTime,
:endDate,
:endDateTime,
:recordStatus,
:versionNo
FROM
Place,
Placement
WHERE
Place.compartmentId =:compartmentID
AND Place.recordStatus <> :recordStatus
AND Placement.placeid = Place.placeid
AND Placement.recordStatus=:placementStatus
AND Placement.startDate<=:placementDatetime
AND (Placement.endDate is NULL or Placement.endDate>=:placementDatetime)
|