CREATE VIEW "SBODEMODE"."B1_ActivityView" ( "ObjType", "ClgCode", "Recontact", "Action", "CntctType", "CntctTypeName", "CardCode", "custmrName", "AttendUser", "AttendEmpl", "Details", "Closed", "personal", "Notes", "CntctSbjct", "CntctSbjctname", "AtcEntry", "DocType", "DocEntry", "CntctDate", "Location", "endDate", "BeginTime", "ENDTime", "Duration", "DurType", "CntctCode", "status", "StatusName", "tentative", "Priority", "Reminder", "RemDate", "RemTime", "RemQty", "RemType", "SlpCode", "CloseDate", "Tel", "Fax", "room", "street", "city", "country", "state", "parentType", "parentId", "prevActvty", "CntctTime", "OprId", "OprLine", "RecurPat", "SeriesNum", "AssignedBy", "inactive", "IsRemoved", "technician", "SchClosed", "AttendReci" ) AS SELECT 33 AS "ObjType", T0."ClgCode" AS "ClgCode", T0."Recontact" AS "Recontact", T0."Action" AS "Action", T0."CntctType" AS "CntctType", T1."Name" AS "CntctTypeName", T0."CardCode" AS "CardCode", '' AS "custmrName", T0."AttendUser" AS "AttendUser", T0."AttendEmpl" AS "AttendEmpl", T0."Details" AS "Details", T0."Closed" AS "Closed", T0."personal" AS "personal", T0."Notes" AS "Notes", T0."CntctSbjct" AS "CntctSbjct", T2."Name" AS "CntctSbjctname", T0."AtcEntry" AS "AtcEntry", T0."DocType" AS "DocType", T0."DocEntry" AS "DocEntry", T0."CntctDate" AS "CntctDate", T0."Location" AS "Location", T0."endDate" AS "endDate", T0."BeginTime" AS "BeginTime", T0."ENDTime" AS "ENDTime", T0."Duration" AS "Duration", T0."DurType" AS "DurType", T0."CntctCode" AS "CntctCode", T0."status" AS "status", T3."name" AS "StatusName", T0."tentative" AS "tentative", T0."Priority" AS "Priority", T0."Reminder" AS "Reminder", T0."RemDate" AS "RemDate", T0."RemTime" AS "RemTime", T0."RemQty" AS "RemQty", T0."RemType" AS "RemType", T0."SlpCode" AS "SlpCode", T0."CloseDate" AS "CloseDate", T0."Tel" AS "Tel", T0."Fax" AS "Fax", T0."room" AS "room", T0."street" AS "street", T0."city" AS "city", T0."country" AS "country", T0."state" AS "state", T0."parentType" AS "parentType", T0."parentId" AS "parentId", T0."prevActvty" AS "prevActvty", T0."CntctTime" AS "CntctTime", T0."OprId" AS "OprId", T0."OprLine" AS "OprLine", T0."RecurPat" AS "RecurPat", T0."SeriesNum" AS "SeriesNum", T0."AssignedBy" AS "AssignedBy", T0."inactive" AS "inactive", T0."IsRemoved" AS "IsRemoved", -1 AS "technician", 'N' AS "SchClosed", T0."AttendReci" AS "AttendReci" FROM  "SBODEMODE"."OCLG" T0   LEFT OUTER  JOIN "SBODEMODE"."OCLT" T1  ON  T1."Code" = T0."CntctType"    LEFT OUTER  JOIN "SBODEMODE"."OCLS" T2  ON  T2."Code" = T0."CntctSbjct"    LEFT OUTER  JOIN "SBODEMODE"."OCLA" T3  ON  T3."statusID" = T0."status" WITH READ ONLY