SF_ACTHRS_ID_VW

(SQL View)
Index Back

Actual Hrs Prdn Id View


select distinct a.business_unit, a.production_id, a.op_sequence, m.work_center_code, a.crew_code, b.machine_code, m.crewsize, m.mach_resources from ps_sf_op_resrc a, ps_sf_op_resrc b, PS_SF_OP_LIST m where a.op_sequence = b.op_sequence and a.business_unit = b.business_unit and a.production_id = b.production_id and (a.sf_resrc_type <> '50' and b.sf_resrc_type <> '50') and ( ( (a.sf_resrc_type <> b.sf_resrc_type) and (a.crew_code <> ' ' and b.machine_code <> ' ') ) or ( (a.sf_resrc_type = b.sf_resrc_type) and not exists ( select 'x' from ps_sf_op_resrc c, ps_sf_op_resrc d where (b.business_unit = d.business_unit and a.business_unit = c.business_unit) and (a.production_id = c.production_id and b.production_id = d.production_id) and ( a.op_sequence = c.op_sequence and b.op_sequence = d.op_sequence) and (c.sf_resrc_type <> '50' and d.sf_resrc_type <> '50') and (c.sf_resrc_type <> d.sf_resrc_type and (c.crew_code <> ' ' and d.machine_code <> ' ')))) ) and m.business_unit=a.business_unit and m.production_id = a.production_id and m.op_sequence = a.op_sequence

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 PRODUCTION_ID Character(10) VARCHAR2(10) NOT NULL Production ID
3 OP_SEQUENCE Number(4,0) SMALLINT NOT NULL Operation Sequence
4 WORK_CENTER_CODE Character(10) VARCHAR2(10) NOT NULL Work Center
5 CREW_CODE Character(10) VARCHAR2(10) NOT NULL Crew Name
6 MACHINE_CODE Character(10) VARCHAR2(10) NOT NULL Machine Code
7 CREWSIZE Number(7,2) DECIMAL(6,2) NOT NULL Crew Size
8 MACH_RESOURCES Number(7,2) DECIMAL(6,2) NOT NULL Machine Resources