SQL View Name:active_models_view
SQL View Number:6069
Group:Analytics
Base Table:model
Description:
Flags:VIEW_OPTIMIZED 
Baseline/Custom:Baseline

Fields:

Field NameCommon TypeDatabase TypeGeneric Field IDArray SizeDefaultFlagsComment
activationCLK_TIMEdatetime    The date that the model was activated 
archiveCLK_TIMEdatetime    The date that the model was activated 
descriptionCHARvarchar 255  Model description 
model_typeCHARvarchar 32  Type of object 
model_type_rankLONGint   DIRECT Type rank of model 
nameCHARvarchar 32  Model name 
OBJIDLONGint3  DIRECT Internal record number 
session_objidLONGint   DIRECT Internal record number for session 
statusCHARvarchar    Status of object 
status_rankLONGint   DIRECT Status rank of model 

SQL:

(
select table_model_ds_se_view.objid, table_model_ds_se_view.name,
table_model_ds_se_view.description, table_model_ds_se_view.activation,
table_model_ds_se_view.model_type, table_model_ds_se_view.model_type_rank,
table_model_ds_se_view.status, table_model_ds_se_view.status_rank,
table_model_ds_se_view.session_objid, table_model.archived_dt as archive
from table_model_ds_se_view, table_model
where table_model_ds_se_view.status_rank=3 and table_model.objid=table_model_ds_se_view.objid
and table_model_ds_se_view.objid not in (Select submodel_objid from table_combined_model_view where status_rank=3)
union
select table_model_rs_dt_ds_se_view.objid, table_model_rs_dt_ds_se_view.name,
table_model_rs_dt_ds_se_view.description, table_model_rs_dt_ds_se_view.activation,
table_model_rs_dt_ds_se_view.model_type, table_model_rs_dt_ds_se_view.model_type_rank,
table_model_rs_dt_ds_se_view.status, table_model_rs_dt_ds_se_view.status_rank,
table_model_rs_dt_ds_se_view.session_objid, table_model.archived_dt as archive
from table_model_rs_dt_ds_se_view, table_model
where table_model_rs_dt_ds_se_view.status_rank=3 and table_model.objid=table_model_rs_dt_ds_se_view.objid
and table_model_rs_dt_ds_se_view.objid not in (Select submodel_objid from table_combined_model_view where status_rank=3)
union
select table_model_rs_list_view.objid, table_model_rs_list_view.name,
table_model_rs_list_view.description, table_model_rs_list_view.activation,
table_model_rs_list_view.model_type, table_model_rs_list_view.model_type_rank,
table_model_rs_list_view.status, table_model_rs_list_view.status_rank,
table_model_rs_list_view.session_objid, table_model.archived_dt as archive
from table_model_rs_list_view, table_model
where table_model_rs_list_view.status_rank=3 and table_model.objid=table_model_rs_list_view.objid
and table_model_rs_list_view.objid not in (Select submodel_objid from table_combined_model_view where status_rank=3)
)
My Recent Objects
active_models_view