1 |
/*------------------------------------------------------------------------------ |
---|
2 |
-- 개체 이름 : FOS.MATERIALSELLER |
---|
3 |
-- 만든 날짜 : 2009-03-06 오후 3:44:23 |
---|
4 |
-- 마지막으로 수정한 날짜 : 2011-03-22 오후 1:42:35 |
---|
5 |
-- 상태 : VALID |
---|
6 |
------------------------------------------------------------------------------*/ |
---|
7 |
CREATE OR REPLACE FORCE VIEW FOS.MATERIALSELLER |
---|
8 |
( CATERINGCODE, MESSROOMCODE, MATERIALCODE, STARTDAY, |
---|
9 |
PRESELLERCODE, SELLERCODE, REGISTERID, REGISTERDATE, |
---|
10 |
MODIFIERID, MODIFIERDATE ) |
---|
11 |
AS |
---|
12 |
select b.cateringCode, |
---|
13 |
b.messroomCode, |
---|
14 |
c.item_cd, |
---|
15 |
'20001010' startDay, |
---|
16 |
'100001' preSellerCode, |
---|
17 |
'100001' sellerCode, |
---|
18 |
'' registerId, |
---|
19 |
'' registerDate, |
---|
20 |
'' modifierId, |
---|
21 |
'' modifierDate |
---|
22 |
from fan.fzb002t a, |
---|
23 |
smallMessroom b, |
---|
24 |
material_customer c --MATERIAL_CUSTOMER |
---|
25 |
where a.cust_no=b.store_cust_no |
---|
26 |
and a.KUNPG=c.customer |
---|
27 |
and b.store_type='301' |
---|
28 |
--and to_char(sysdate, 'YYYYMMDD') between APP_STA_DT and APP_END_DT --기간관리 안함 2009년 3월 27일 김윤혜주임 확인 |
---|
29 |
and decode((select 'Y' |
---|
30 |
from material_customer d |
---|
31 |
where d.customer= a.KUNPG |
---|
32 |
-- and to_char(sysdate, 'YYYYMMDD') between d.APP_STA_DT and d.APP_END_DT --기간관리 안함 2009년 3월 27일 김윤혜주임 확인 |
---|
33 |
and rownum=1), 'Y', 'Y', 'N')='Y' |
---|
34 |
union all |
---|
35 |
select e.cateringCode, |
---|
36 |
e.messroomCode, |
---|
37 |
a.item_cd, |
---|
38 |
'20001010' startDay, |
---|
39 |
'100001' preSellerCode, |
---|
40 |
'100001' sellerCode, |
---|
41 |
'' registerId, |
---|
42 |
'' registerDate, |
---|
43 |
'' modifierId, |
---|
44 |
'' modifierDate |
---|
45 |
from epro.item a, |
---|
46 |
epro.item_oper_org b, |
---|
47 |
industryinfo c, |
---|
48 |
fan.fzb002t d, |
---|
49 |
smallMessroom e |
---|
50 |
where a.ITEM_SEQ=b.ITEM_SEQ |
---|
51 |
and b.oper_org_cd = '3000' |
---|
52 |
and b.apprv_yn = 'Y' |
---|
53 |
and b.PRICE_GRD=c.PRICE_GRD |
---|
54 |
and c.industry=d.industry |
---|
55 |
and d.cust_no=e.store_cust_no |
---|
56 |
and e.store_type='301' |
---|
57 |
and decode((select 'Y' |
---|
58 |
from material_customer k |
---|
59 |
where k.customer= d.KUNPG |
---|
60 |
--and to_char(sysdate, 'YYYYMMDD') between k.APP_STA_DT and k.APP_END_DT --기간관리 안함 2009년 3월 27일 김윤혜주임 확인 |
---|
61 |
and rownum=1), 'Y', 'Y', 'N')='N' |
---|
62 |
union all |
---|
63 |
select CATERINGCODE, |
---|
64 |
MESSROOMCODE, |
---|
65 |
MATERIALCODE, |
---|
66 |
STARTDAY, |
---|
67 |
PRESELLERCODE, |
---|
68 |
SELLERCODE, |
---|
69 |
REGISTERID, |
---|
70 |
'' REGISTERDATE, |
---|
71 |
MODIFIERID, |
---|
72 |
'' MODIFIERDATE |
---|
73 |
from materialseller02 |
---|
74 |
; |
---|
75 |
|
---|
76 |
COMMENT ON COLUMN FOS.MATERIALSELLER.CATERINGCODE IS '회사'; |
---|
77 |
|
---|
78 |
COMMENT ON COLUMN FOS.MATERIALSELLER.MESSROOMCODE IS '사업장'; |
---|
79 |
|
---|
80 |
COMMENT ON COLUMN FOS.MATERIALSELLER.MATERIALCODE IS '품목'; |
---|
81 |
|
---|
82 |
COMMENT ON COLUMN FOS.MATERIALSELLER.STARTDAY IS '시작일'; |
---|
83 |
|
---|