ORACLE视图添加备注

时间:2023-03-09 08:09:51
ORACLE视图添加备注

版权声明:本文为博主原创文章,未经博主允许不得转载。

create or replace view oes_material_series_ref as
select t.productgroup, o.idnrk materialcode, t.seriescode
  from oes_park_priority t
 inner join oms_hm_mtl_general_view v
    on t.materialcode = v.material_code
  left join oms_modelbom_noderela o
    on t.materialcode = o.matnr
 where 1 = 1
   and v.primary_uom = 'TAO'
 group by t.productgroup, t.materialcode, o.idnrk, t.seriescode
union
select t.productgroup, t.materialcode, t.seriescode
  from oes_park_priority t
 inner join oms_hm_mtl_general_view v
    on t.materialcode = v.material_code
 group by t.productgroup, t.materialcode, t.seriescode;
comment on column OES_MATERIAL_SERIES_REF.PRODUCTGROUP is '产品组';
comment on column OES_MATERIAL_SERIES_REF.MATERIALCODE is '物料号';
comment on column OES_MATERIAL_SERIES_REF.SERIESCODE is '系列';