select
a.recname
from psrecfield a,
PSRECDEFN b,
psrecfield d,
psrecfield e,
psrecfield c
where a.fieldname = 'BUSINESS_UNIT'
and (a.edittable='SP_BU_OM_NONVW'
or a.edittable='SP_BU_OM_CLSVW'
or a.edittable='SP_BU_OM_OPRVW'
or a.edittable='BUS_UNIT_TBL_OM')
and a.fieldnum = 1
and a.recname = b.recname
and b.rectype = 0
and b.recname not like 'AUDIT%'
and e.recname=a.recname
and e.fieldname = 'SCHED_LINE_NBR'
and e.fieldnum = 4
and d.recname=a.recname
and d.fieldname = 'ORDER_INT_LINE_NO'
and d.fieldnum = 3
and c.recname=a.recname
and c.fieldname = 'ORDER_NO'
and c.fieldnum = 2
|