SELECT
Hearing.scheduledDateTime,
Hearing.actualStartTime,
Hearing.statusCode,
Hearing.locationID,
Hearing.locationType,
Hearing.externalOfficeID,
Location.name,
ExternalPartyOffice.name
INTO
:scheduledDateTime,
:actualStartTime,
:statusCode,
:locationID,
:locationType,
:externalOfficeID,
:locationName,
:externalPartyOfficeName
FROM
Hearing
LEFT OUTER JOIN
Location
ON (Location.LocationID = Hearing.locationID)
LEFT OUTER JOIN
ExternalPartyOffice
ON (ExternalPartyOffice.externalPartyOfficeID = Hearing.externalOfficeID)
WHERE
Hearing.caseID = :caseID
ORDER BY Hearing.actualStartTime, Hearing.scheduledDateTime
|