array("InstallationRecord" =>
"select InstallationRecordSubtype.Description as Subtype,".
"InstallationRecord.EquipmentOID, InstallationRecord.ID, ".
to_char("InstallationRecord.RecordDate")." as RecordDate from ".
"InstallationRecord, InstallationRecordSubtype where ".
"NetworkOID='".$_SESSION["FacilityID"]."' and InstallationRecord.Subtype=".
"InstallationRecordSubtype.Subtype order by ".
"InstallationRecord.RecordDate desc, InstallationRecord.Subtype desc",
"EstimationRecord" => "select EstimationRecordSubtype.Description as Subtype,".
"EstimationRecord.ID, ".to_char("EstimationRecord.StartDate")." as StartDate,".
to_char("EstimationRecord.RecordDate")." as EndDate,".
"EstimationRecord.Value, EstimationRecordStatus.Description as Status".
" from EstimationRecord, EstimationRecordSubtype, ".
"EstimationRecordStatus where ".
"EstimationRecord.NetworkOID='".
$_SESSION["FacilityID"]."' and EstimationRecord.Subtype = ".
"EstimationRecordSubtype.Subtype and EstimationRecord.Status = ".
"EstimationRecordStatus.CodedValue order by RecordDate desc",
"OperationsRecord" => "select OperationsRecordSubtype.Description as Subtype,".
" OperationsRecord.ID,".to_char("OperationsRecord.RecordDate").
" as RecordDate, OperationsRecordStatus.Description as Status,".
"OperationsRecord.Value from OperationsRecord, OperationsRecordSubtype,".
"OperationsRecordStatus ".
"where OperationsRecord.NetworkOID='".$_SESSION["FacilityID"]."' and ".
"OperationsRecord.Subtype = OperationsRecordSubtype.Subtype and ".
"OperationsRecord.Status = OperationsRecordStatus.CodedValue ".
"order by RecordDate desc, OperationsRecord.Subtype desc")