SQL View Name:open_script_distinct_v
SQL View Number:5982
Group:Scripts Mgr
Base Table:process
Description:To show information related to a single script of all active versions. Used by script player application
Flags:VIEW_OPTIMIZED 
Baseline/Custom:Baseline

Fields:

Field NameCommon TypeDatabase TypeGeneric Field IDArray SizeDefaultFlagsComment
authorCHARvarchar 30  User login name 
categoryCHARvarchar 40  User=defined category - user-defined popup list 'Script Category'  
descriptionCHARvarchar 255  A brief description of the nature of the process 
is_validatedLONGtinyint   DIRECT 0 = the process definition is not validated, 1 = the definition is validated and may be made active 
last_updatedCLK_TIMEdatetime    Date and time the process definition was last modified 
process_objidLONGint3  DIRECT Internal record number 
script_nameCHARvarchar 30  Script Name 
statusCHARvarchar 80  Name of the item/element 
status_rankLONGint   DIRECT Position of the item in the list; important in tracking scheduled/unscheduled and config time for service interuption report 
typeLONGtinyint   DIRECT Process type: 0 = Process, 1 = Script 
user_objidLONGint   DIRECT Internal record number 
visibleLONGtinyint   DIRECT Controls if the process/script may be selected and run by an agent choice: 0 = no, 1 = yes 

SQL:

(
select p1.objid as process_objid,
p1.id as script_name,
p1.category as category,
p1.last_mod_time as last_updated,
p1.description as description,
p1.is_agent_runnable as visible,
p1.is_validated as is_validated,
p1.type as type,
g1.title as status,
g1.rank as status_rank,
u1.objid as user_objid,
u1.login_name as author
from table_process p1, table_gbst_elm g1, table_user u1
where p1.objid in
(select min(p.objid)
from table_process p, table_gbst_elm g
where p.type=1 AND g.rank=3 AND p.process_status2gbst_elm=g.objid
group by p.id) AND p1.process_status2gbst_elm=g1.objid AND p1.author2user=u1.objid
)
My Recent Objects
open_script_distinct_v