webco_8.0
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
find_res_first_sched_oid
Parameters
Name
Type
Mode
$1
bigint
IN
Definition
begin return (select obj_oid from resource_schedule t1 where type = 'CHECKOUT-COMPLETED' and exists ( select null from ( select scheduled_resource_oid, min(real_end_time) et from resource_schedule where type = 'CHECKOUT-COMPLETED' and scheduled_resource_oid = $1 group by scheduled_resource_oid ) t2 where t2.scheduled_resource_oid = t1.scheduled_resource_oid and t2.et = t1.real_end_time) limit 1 ); end