SQL Id | SQL Text |
0cju83fh33y95 | SELECT COUNT(*) FROM (SELECT DISTINCT DATED FROM OPR_WAGES_EMP_MASTER WHERE TO_DATE(DATED, 'DD-MM-RR') BETWEEN :b1 AND :b2 ) |
0k8522rmdzg4k | 獥汥捴⁰物癩汥来⌠晲潭祳慵瑨␠睨敲攠⡧牡湴敥⌽㨱爠杲慮瑥攣㴱⤠慮搠灲楶楬敧攣㸰 |
0qjt2sznvf0r9 | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin DBMS_SNAPSHOT.REFRESH( 'PRODUCTION.MV_SHIPPING'); end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
14n50dm1hxqad | SELECT DISTINCT C.SR# FROM PRODUCTION.CUT_SUPLY_BUNDL C, CUT_SUPLY_BUNDL_M M WHERE C.DOC_ID=M.DOC_ID AND C.CARD_NO=:B2 AND M.PLANNO=:B1 AND C.STATUS=0 AND C.SR# IN (SELECT NVL(A.SR#, 0) FROM STIT_REC_ISSUE_D A ) |
17x173b8v53p7 | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin DBMS_SNAPSHOT.REFRESH( 'PRODUCTION.MV_STITCHING'); end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
1w12wdb3vzc9h | select /*+ index(idl_sb4$ i_idl_sb41) +*/ max(version) from idl_sb4$ where obj#=:1 and version > 0 and version<=:2 and (part=0 or part=2) and piece#=0 |
2jzkmzmzxza9p | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin DBMS_SNAPSHOT.REFRESH( 'PRODUCTION.yarn_bag_stk_loc'); end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
2q4xbuu7qhbd9 |
SELECT CASE WHEN :B7 =0 THEN NVL((((((STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 ))*100)/KNT_KNT_WASTE(:B5 , :B3 , :B2 ))*100)* KNT_YARN_RATE(:B5 , :B3 , :B2 )), 0) ELSE NVL(((((((STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 ))*100)/KNT_KNT_WASTE(:B5 , :B3 , :B2 ))*100)/KNT_YDY_WASTE(:B5 , :B3 , :B2 )*100)) * KNT_YARN_RATE(:B5 , :B3 , :B2 ), 0) END + NVL((((((STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 ))*100)/KNT_KNT_WASTE(:B5 , :B3 , :B2 ))*100)* KNT_YDY_RATE(:B5 , :B3 , :B2 )), 0)+ CASE WHEN :B6 =22 THEN NVL((((STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 ))*100)/KNT_KNT_CONSUMPTION(:B5 , :B3 , :B2 )*KNT_KNT_RATE(:B5 , :B3 , :B2 ) ), 0) WHEN :B6 =2 THEN DECODE(KNT_KNT_OPR_VAL(:B2 , 'OPR'), 'D', (STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 )*100)*(KNT_KNT_OPR_VAL(:B2 , 'CON')/KNT_KNT_OPR_VAL(:B2 , 'VAL'))*KNT_KNT_RATE(:B5 , :B3 , :B2 ), 'M', (STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 )*100)*KNT_KNT_OPR_VAL(:B2 , 'CON')*KNT_KNT_RATE(:B5 , :B3 , :B2 )) ELSE NVL((((STK/DYE_DYEING_WASTE(:B5
, :B3 , :B2 , :B1 ))*100)*KNT_KNT_RATE(:B5 , :B3 , :B2 ) ), 0) END + NVL((((STK/DYE_DYEING_WASTE(:B5 , :B3 , :B2 , :B1 ))*100)*DYE_DYEING_RATE(:B5 , :B3 , :B2 , :B1 )), 0)+ NVL((STK*PRT_PRINT_RATE(:B5 , :B3 , :B2 , :B1 )), 0) + NVL(STK*FIN_FINISH_RATE(:B5 , :B3 , :B2 , :B1 ), 0) FROM ( SELECT NVL(SUM(B.NW_IN), 0) STK FROM FAB_SR_MAST A , FAB_SR_DTL B WHERE A.SUP_REC_NO = B.SUP_REC_NO AND A.STOCK_TYPE IN ('FFB', 'FFA') AND A.CCODE = :B5 AND A.SUP_TARGET='RECEIVED' AND TO_DATE(A.ENTRY_DATE, 'DD-MM-YY')<= TO_DATE(:B4 , 'DD-MM-YY') AND PLANNO=:B3 AND FABRIC_CODE=:B2 AND COLOR=:B1 ) |
2xbwahn0u2umy | select max(bitand(nvl(option$, 0), 17)) from sysauth$ auth where privilege#=:1 connect by grantee#=prior privilege# and privilege#>0 start with (grantee#=:2 and privilege#>0 and privilege# in ( 2, 774, 778, 781, 783, 787, 789, 790, 794, 798, 801, 804, 808, 810, 816, 827, 828, 833, 834, 837 )) or (grantee#=1 and privilege#>0) group by privilege# |
2zwn3h2hr377k | SELECT SUM(VALUE)/ SUM(STKKG) FROM ( SELECT A.CCODE, B.PLANNO, B.FABRIC_CODE, GET_FABRIC(B.FABRIC_CODE) FABRUC, B.COLOR, NVL(SUM(B.NW_IN), 0) STK , PRODUCTION.FINISH_FABRIC_REC(A.CCODE, B.PLANNO, B.FABRIC_CODE, B.COLOR, SYSDATE) VALUE, PRODUCTION.FINISH_FABRIC_REC(A.CCODE, B.PLANNO, B.FABRIC_CODE, B.COLOR, SYSDATE) /NVL(SUM(B.NW_IN), 0) PKGRATE , P.UNIT_CODE, DECODE(P.UNIT_CODE, 1, NVL(SUM(B.NW_IN), 0), 0) STKKG FROM FAB_SR_MAST A , FAB_SR_DTL B, TBLPLAN_CUT_DYE_KNT P WHERE A.SUP_REC_NO = B.SUP_REC_NO AND A.STOCK_TYPE IN ('FFB', 'FFA') AND A.CCODE = 9 AND A.SUP_TARGET='RECEIVED' AND TO_DATE(A.ENTRY_DATE, 'DD-MM-YY')<= SYSDATE AND B.PLANNO=:B1 AND B.PLANNO=P.PLAN_NO AND B.FABRIC_CODE=P.FABRIC_CODE AND B.COLOR=P.COLOR GROUP BY A.CCODE, B.PLANNO, B.FABRIC_CODE, B.COLOR, P.UNIT_CODE ) |
36jw96jy2mrt3 | SELECT AVG(RATE) FROM( SELECT DISTINCT M.PLAN_NO, D.FABRIC_CODE, D.ITEM_SUB_CODE, KNT_WST, RATE, ECRU_YARN_RATE(M.PLAN_NO, D.ITEM_SUB_CODE) ERATE FROM TBLCONTRACTMAST M, TBLKNTCONTRACTDTL D WHERE M.CONTRACT_NO=D.CONTRACT_NO AND M.PLAN_NO=:B3 AND D.FABRIC_CODE=:B2 AND M.CCODE=:B1 AND D.KNT_QTY>0 AND EXISTS (SELECT 1 FROM FAB_SR_MAST A, FAB_SR_DTL B WHERE A.SUP_REC_NO=B.SUP_REC_NO AND A.CCODE=:B1 AND A.STOCK_TYPE='GFB' AND A.ENTRYTYPE IN('FRE', 'FRD') AND B.FABRIC_CODE=:B2 AND B.PLANNO=:B3 AND A.CONTRACT_ISUNO=M.CONTRACT_NO) ) |
38vxaybzk778b | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin DBMS_SNAPSHOT.REFRESH( 'PRODUCTION.wages_sheet_mv'); end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
39m4sx9k63ba2 | 獥汥捴 ⨫湤數⡩摬彵戲␠楟楤江畢㈱⤠⬪⼠灩散攣ⱬ敮杴栬灩散攠晲潭摬彵戲␠睨敲攠潢樣㴺ㄠ慮搠灡牴㴺㈠慮搠癥牳楯渽㨳牤敲礠灩散攣 |
3ss16xn9jc3by |
select /*+ NO_CPU_COSTING */ mm.col, mm.ACT_SIZE, mm.REQ_QTY, MM.TO_CUT_PCS TO_CUT_PC , ab.qty1, nvl(S.S_QTY, 0) S_QTY, round(mm.REQ_QTY + (mm.REQ_QTY*tp.waste/100), 0) req_2, Z.REJ_QTY, ST_QTY, s.cut_status, s.ind_status, s.stit_status, s.plan_status, WR.WHQTY, SR.WRQTY from ACT_CUT_PCS_VIEW MM, tblplanorder tp, plan_status s, ( SELECT m.planno, d.g_SIZe, SUM(nvl(D.QTY, 0)) QTY1 FROM CUT_SUPLY_BUNDL D, CUT_SUPLY_BUNDL_M M WHERE (M.ENTRY_TYPE = 'IITS') AND (M.DOC_ID = D.DOC_ID) and m.planno=:plan GROUP BY M.PLANNO, M.ENTRY_TYPE, D.G_SIZE ) ab , ( select v.planno, v.g_size, nvl(sum(v.rej_qty), 0) rej_qty from cut_stch_iss_bal_v v where v.planno=:plan group by v.planno, v.g_size ) z , ( select t.ACT_SIZE COL, v.s1 S_QTY from SHIP_SIZE_VIEW v, act_cut_pcs_view t where t.PLAN_NO=v.plan_no and t.plan_no= :PLAN and t.COL=v.S order by v.S ) S, (SELECT T.ACT_SIZE COL, SUM(V.QTY) WHQTY FROM STITCH_RECIVE_WHAREHOUSE V, ACT_CUT_PCS_VIEW T WHERE T.PLAN_NO=V.PLANNO AND T.PLAN_NO= :PLAN
AND T.COL=V.COL_SIZE GROUP BY T.ACT_SIZE, V.COL_SIZE HAVING SUM(V.QTY)>0 ORDER BY V.COL_SIZE) WR, (SELECT T.ACT_SIZE COL, SUM(R.QTY)WRQTY FROM STITCH_RETURN_WHAREHOUSE R, ACT_CUT_PCS_VIEW T WHERE T.PLAN_NO=R.PLANNO AND T.PLAN_NO=:PLAN AND T.COL=R.COL_SIZE GROUP BY T.ACT_SIZE, R.COL_SIZE HAVING SUM(R.QTY)>0 ORDER BY R.COL_SIZE)SR, (select d.g_size, sum(d.stitched_qty) ST_QTY from cut_suply_bundl_m m, cut_suply_bundl d where d.doc_id=m.doc_id and d.ent_type='IITS' and m.planno=:PLAN and d.stitched_qty is not null group by m.planno, d.g_size order by d.col_size ) h where tp.plan_no =MM.plan_no AND MM.PLAN_NO = :PLAN and ab.g_size(+)=mm.ACT_SIZE and z.g_size(+)=mm.ACT_SIZE and S.COL(+)=mM.act_size and h.g_size(+)=mM.act_size and wr.col(+)=mM.act_size and sr.col(+)=mM.act_size AND MM.REQ_QTY>0 and tp.waste is not null and mm.plan_no=s.plan_no(+) group by mm.col, MM.PLAN_NO, mm.ACT_SIZE, mm.REQ_QTY, ab.qty1, rej_qty, tp.waste, S.S_QTY, MM.TO_CUT_PCS, ST_QTY , s.cut_status, s.ind_
status, s.stit_status, s.plan_status, WR.WHQTY, SR.WRQTY Order by 1 |
42w5jvwyztq0h | SELECT NVL(GET_PLAN_PO_QTY(:B2 , :B1 ), 0) FROM DUAL |
4uw118z2skgz1 | SELECT WM_CONCAT(PROCESS_NAME) FROM ( SELECT DISTINCT P.PROCESS_NAME, FR.ORD FROM RND_SR_DTL D, PRODUCTION.SD_FINISH_ROUT FR, PRODUCTION.FINISH_ROUT P WHERE D.SUP_REC_NO=:B2 AND D.PK=FR.PK AND D.PK=:B1 AND FR.PROCESS_ID=P.PROCESS_ID ORDER BY ORD ) |
5n4u7kgq4hwgm |
INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "PRODUCTION"."MV_SHIPPING" select t.ccode, c.c_name, s.plan_no, 'BY- ' || e.ship_mode ship_mode, e.inv_date ship_date, t.pono, t.pl_no, trunc(t.pl_date) PL_DATE, m.style, nvl(get_cmt_rate(t.ccode, s.plan_no, g.garment_id), 0) CMT_RATE, e.inv_no, e.inv_no_m, GetPL_Qty_PCS(t.pl_no) PCS, GetPL_Qty_PCS(t.pl_no)*nvl(get_cmt_rate(t.ccode, s.plan_no, g.garment_id), 0) AMOUNT, get_cmt_contract_no(t.ccode, s.plan_no, g.garment_id)contract_no , g.garment_id , t.po_close from wpl_mst t, tblplanorder s, kcl_po_main m, expinv_mst e, dye.cdtl c, expinv_dtl_pl ed, tblplanpics g where t.pack_type = 'WP' and s.order_no = t.pono and e.inv_no = ed.inv_no and ed.pl_no = t.pl_no and m.pono = s.order_no AND E.CANCEL_STATUS='N' and e.approved=1 and g.plan_no=s.plan_no and t.ccode=c.c_code --and s.plan_no LIKE NVL(:planno, '%') --and t.pl_no not in (select r.pl_no from expsal_inv r) -- and trunc(e.inv_date) between nvl(:FDATE ,
to_date(sysdate-10000, 'DD-MM-RRRR')) AND nvl(:TDATE , to_date(sysdate, 'DD-MM-RRRR')) --and t.ccode=decode(:P_cCODE, 4, 15, NULL, T.CCODE, :P_CCODE) union all select t.ccode, c.c_name, s.plan_no, 'BY- ' || e.ship_mode ship_mode, e.inv_date ship_date, t.pono, t.pl_no, trunc(t.pl_date) PL_DATE, m.style, nvl(get_cmt_rate(t.ccode, s.plan_no, g.garment_id), 0) CMT_RATE, e.inv_no, e.inv_no_m, PL.TOTAL_QTY PCS , PL.TOTAL_QTY*nvl(get_cmt_rate(t.ccode, s.plan_no, g.garment_id), 0) AMOUNT, get_cmt_contract_no(t.ccode, s.plan_no, g.garment_id)contract_no , g.garment_id, t.po_close from wpl_mst t, wpl_dtl_aeopo pl, tblplanorder s, kcl_po_main m, expinv_mst e, dye.cdtl c, expinv_dtl_pl ed, tblplanpics g where t.pack_type = 'WP' and s.order_no = pl.pono and e.inv_no = ed.inv_no and ed.pl_no = t.pl_no and m.pono = s.order_no AND E.CANCEL_STATUS='N' -- and t.unit_12 LIKE NVL(:unit_12, '%') --and c.c_code = e.ccode and e.approved=1 and t.ccode=c.c_code --and s.plan_no LIKE NVL(
:planno, '%') and pl.pl_no=t.pl_no and g.plan_no=s.plan_no --and t.pl_no not in (select r.pl_no from expsal_inv r) -- and trunc(e.inv_date) between nvl(:FDATE , to_date(sysdate-10000, 'DD-MM-RRRR')) AND nvl(:TDATE , to_date(sysdate, 'DD-MM-RRRR')) --and t.ccode=decode(:P_CCODE, 4, 15, NULL, T.CCODE, :P_CCODE) union all select m.ccode, c.c_name, m.plan_no, 'LOCAL' ship_mode, m.cdate ship_date, ' ' pono, ' ' pl_no, m.cdate PL_DATE, ' ' style, nvl(get_cmt_rate(m.ccode, m.plan_no, m.gmt_id), 0) CMT_RATE, 0 inv_no, ' ' inv_no_m, m.plan_qty PCS , m.plan_qty*nvl(get_cmt_rate(m.ccode, m.plan_no, m.gmt_id), 0) AMOUNT, get_cmt_contract_no(m.ccode, m.plan_no, m.gmt_id)contract_no , m.gmt_id garment_id, ' 'po_close from tblcontractmast m, dye.cdtl c where m.ccode=c.c_code and m.remarks='LOCALCMT' and m.sam_pcs is not null --and t.pl_no not in (select r.pl_no from expsal_inv r) -- and trunc(m.cdate) between nvl(:FDATE , to_date(sysdate-10000, 'DD-MM-RRRR')) AND nvl(:TDATE , to_d
ate(sysdate, 'DD-MM-RRRR')) -- and m.ccode=decode(:P_CCODE, 4, 15, NULL, m.CCODE, :P_CCODE) |
5p06akzdb4y5s | select log, oldest, oldest_pk, oldest_oid, oldest_new, youngest+1/86400, flag, yscn, oldest_seq, oscn, oscn_pk, oscn_oid, oscn_new, oscn_seq from sys.mlog$ where mowner = :1 and master = :2 |
5pjx5pj5xsmn7 | SELECT SYSDATE FROM SYS.DUAL |
5z5jy8x016mc5 |
select distinct plan_no, ccode, u.fabric_code, f.fabric_type, u.des, u.color, sum(stock) stock_pcs, sum(total_pcs_wght) wt_kg_Pcs_fab, sum(fab_stock) stock_fab_wt, round(NVL(FINISH_FABRIC_CUT_VALUE_NEW12(9, Plan_no, u.fabric_code, u.color, :P_CCODE, :EDATE, u.des), 0), 0) fab_Valuess, netw_plan, RATE_PKG, round((sum(total_pcs_wght)) * production.GET_FAB_VAL(plan_no, 'KG'), 0) /* GET_PLAN_PKG_FF_RATE(plan_no)*/ PCS_Value from tblyarnfabrictype f, ( select a.plan_no, a.ccode, 'NA' fabric_code, 'N/A' des, 'N/A' color, nvl(sum(b.bdl_qty), 0) -cut_resize_qty(a.plan_no, a.ccode, :EDATE) - (nvl(z.issu, 0) - nvl(INDUCTION_RET_QTY(a.plan_no, :EDATE, a.ccode), 0))- cut_dead_plan_pcs(a.plan_no, a.ccode, :EDATE, :EDATE) stock, round((nvl(sum(b.bdl_qty), 0) - (nvl(z.issu, 0) - nvl(INDUCTION_RET_QTY(a.plan_no, :EDATE, a.ccode), 0))- nvl(cut_dead_plan_pcs(a.plan_no, a.ccode, :EDATE, :EDATE), 0)) * (production.get_plan_nw(a.plan_no) / 12), 2) total_pcs_wght, 0 Fab_
stock, production.get_plan_nw(plan_no) netw_plan, production.GET_FAB_VAL(plan_no, 'KG') RATE_PKG from cut_jbcard_m a, cut_jbcard_ddd b, (select a.planno, a.ccode, nvl(sum(b.qty), 0) issu from stit_rec_issue_m a, stit_rec_issue_d b where b.doc_id = a.doc_id and a.document_type = 'STR' and a.ccode = :P_CCODE -- and a.planno = '3870' and trunc(a.doc_date) <= :EDATE and trunc(a.doc_date) > '01-JAN-2012' group by a.planno, a.ccode) z where b.doc_id = a.doc_id and a.ccode = :P_CCODE --and a.plan_no = '3870' and trunc(b.timestmp) <= :EDATE and trunc(b.timestmp) > '01-JAN-2012' and a.plan_no = z.planno(+) and a.ccode = z.ccode(+) group by a.plan_no, a.ccode, z.issu having nvl(sum(b.bdl_qty), 0)-cut_resize_qty(a.plan_no, a.ccode, :EDATE) - (nvl(z.issu, 0) - nvl(INDUCTION_RET_QTY(a.plan_no, :EDATE, a.ccode), 0))-cut_dead_plan_pcs(a.plan_no, a.ccode, :EDATE, :EDATE) > 0 --order by plan_no desc union all ---- fabric Stock select distinct t.plan_no, t.ccode, t.fabr
ic_code, t.des, t.color, /*sum(t.nw_in) Recv_fab, nvl(z.used_fab, 0) used_fab, y.Ret_fab, */ 0 stock, 0 total_pcs_wght, (sum(t.nw_in) - nvl(y.Ret_fab, 0) - nvl(z.used_fab, 0)) Fab_stock, 0 netw_plan, 0 RATE_PKG from cut_fabric_recv t, ( select t.plan_no, to_number(t.ccode) ccode, t.fabric_code, t.descrption, t.color, 0 Recv_fab, nvl(sum(t.used_fab), 0) used_fab, 0 ret_fab from cut_fabric_used_new t where t.DATED <= :EDATE -- and t.plan_no = '3870' and t.DATED > '01-JAN-2012' and t.ccode = :P_CCODE group by t.plan_no, t.ccode, t.fabric_code, t.descrption, t.color) z, (select t.plan_no, t.ccode, t.fabric_code, t.des descrption, t.color, 0 Recv_fab, 0 Used_fab, sum(t.gw_out) Ret_fab from cut_fabric_recv t where t.DATED <= :EDATE and t.DATED > '01-JAN-2012' -- and t.plan_no = '3870' and t.ccode = :P_CCODE group by t.plan_no, t.ccode, t.fabric_code, t.des, t.color) y where t.DATED <= :EDATE --and t.plan_no = '3870' and t.DATED > '01-JAN
-2012' and t.ccode = :P_CCODE and t.plan_no = z.plan_no(+) and t.ccode = z.ccode(+) and t.fabric_code = z.fabric_code(+) and t.des = z.descrption(+) and t.color = z.color(+) and t.plan_no = y.plan_no(+) and t.ccode = y.ccode(+) and t.fabric_code = y.fabric_code(+) and t.des = y.descrption(+) and t.color = y.color(+) group by t.plan_no, t.ccode, t.fabric_code, t.des, t.color, z.used_fab, y.ret_fab having(sum(t.nw_in) - nvl(y.Ret_fab, 0) - nvl(z.used_fab, 0)) > 0 ) u where plan_no not in ( select t.plan_no from cut_plan_close_stk t ) and f.fabric_code (+) = u.fabric_code and plan_no = nvl ( : p_plan_no , plan_no ) group by plan_no , u.ccode , u.fabric_code , u.des , u.color , f.fabric_type , netw_plan , RATE_PKG ORDER BY 1 ASC, 8 ASC, 7 ASC, 12 ASC, 13 ASC, 11 ASC , plan_no |
620nmfq8upvsb | INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "PROCESSING"."MV_GSTK" SELECT DISTINCT A.PLANNO , ENTRYTYPE, NARRATION, B.COLOR, CORPORATE_SUP_NO , A.REC_DATE FROM ( /* QUERY FOR RND*/ SELECT DISTINCT A.PLAN_NO PLANNO, DECODE(A.ENTRY_TYPE, 'DHR', 'GLOT', 'DIR', 'RLOT', 'DFR', 'FLOT') ENTRYTYPE, E.NARRATION, NULL PLAN_NO, CORPORATE_SUP_NO , A.REC_DATE FROM PROCESSING.DYE_SR_DTL B, PROCESSING.DYE_SR_MST A, ENTRYTYPE E WHERE A.ENTRY_NO = B.ENTRY_NO AND A.ENTRY_TYPE IN ('DHR', 'DIR', 'DFR') AND E.STOCKTYPE='DYE' AND A.DEPT_CODE=3502 AND E.ENTRYTYPE=DECODE(A.ENTRY_TYPE, 'DHR', 'GLOT', 'DIR', 'RLOT', 'DFR', 'FLOT') ) A , ( select distinct sup_rec_no, color from rnd_sr_dtl ) b, ( select plan_no from PROCESSING.GSTK WHERE SUBSTR(PLAN_NO, 1, 1)='S' ) S where A.CORPORATE_SUP_NO = b.sup_rec_no AND S.PLAN_NO=A.PLANNO |
6ch3ddxmt1kkx |
SELECT DECODE ( SIGN ( SUBSTR ( A . F_COL , 2 , 2 ) - SUBSTR ( B . F_COL , 2 , 2 ) ) , - 1 , NVL ( B . F , A . F ) , NVL ( A . F , B . F ) ) F , DECODE ( SIGN ( SUBSTR ( A . T_COL , 2 , 2 ) - SUBSTR ( B . T_COL , 2 , 2 ) ) , - 1 , NVL ( A . T , B . T ) , NVL ( B . T , A . T ) ) T , DECODE ( A . CURRENCY , 'PKR' , '?' , 'USD' , '$' , 'GBP' , '£' , 'EURO' , '¿' , 'HUF' , 'Ft' , 'TLY' , 'TL' , 'PLN' , 'z?' , 'CZK' , 'K?' , A . CURRENCY ) C_CUR , DECODE ( B . CURRENCY , 'PKR' , '?' , 'USD' , '$' , 'GBP' , '£' , 'EURO' , '¿' , 'HUF' , 'Ft' , 'TLY' , 'TL' , 'PLN' , 'z?' , 'CZK' , 'K?' , A . CURRENCY ) R_CUR , A . AIRPRICE , A . COST - NVL ( A . AIRPRICE , 0 ) COST , B . RETAIL , A . ORDERID , A . HITID , SUBSTR ( A . TRADETERM , 1 , 1 ) C_TR , SUBSTR ( B . TRADETERM , 1 , 1 ) R_TR , DECODE ( A . INT , 1 , 'INT' , 'MAIN' ) P_INT FROM ( SELECT INT , F , T , AIRPRICE , P COST , CURRENCY , ORDERID , HITID , TRADETERM
, F_COL , T_COL FROM UKPRICE_V V WHERE INV = 1 ) A , ( SELECT INT , F , T , AIRPRICE , P RETAIL , CURRENCY , ORDERID , HITID , TRADETERM , F_COL , T_COL FROM UKPRICE_V WHERE ENTRYTYPE = 'RETAIL' ) B WHERE ( A.ORDERID = B.ORDERID (+) AND NVL ( A.HITID , 0 ) = NVL ( B.HITID (+) , 0 ) AND NVL ( A.TRADETERM , 0 ) = NVL ( B.TRADETERM (+) , 0 ) AND ( A.F_COL BETWEEN NVL ( B.F_COL , A.F_COL ) AND NVL ( B.T_COL , A.F_COL ) OR B.F_COL BETWEEN NVL ( A.F_COL , B.F_COL ) AND NVL ( A.T_COL , B.F_COL ) ) AND A.ORDERID IN ( SELECT ORDERID FROM UKORDER WHERE ACC_ID IN ( 301 , 300 ) AND PHASE_ID IN ( 118 ) ) AND A.ORDERID IN ( 18916 , 19006 , 18920 , 18917 , 19255 , 19007 , 18918 , 19256 , 18921 , 18919 , 19257 , 19008 , 19301 , 19302 , 19303 , 18671 , 18977 , 18976 , 18771 , 19304 , 18609 , 18618 , 18616 , 19264 , 19263 , 19022 , 19021 , 19020 , 19019 , 19266 , 19018 , 18614 , 18610 , 18613 , 18621 , 18620 , 18619 , 19272 , 19017 , 19270 ,
19015 , 19269 , 19014 , 19268 , 19013 , 19267 , 19012 , 19016 , 18612 , 18617 , 19189 , 19243 , 19191 , 19265 , 19011 , 18615 , 18611 , 18653 , 19300 , 19299 , 19298 , 19297 , 18915 , 18975 , 18973 , 18974 , 18669 , 18768 , 19190 , 19196 , 19262 , 19261 , 19034 , 19033 , 19032 , 19031 , 19027 , 19030 , 19028 , 19026 , 19025 , 19024 , 19192 , 19023 , 18601 , 18655 , 19029 , 18600 , 18599 , 18597 , 18598 , 18603 , 18595 , 18594 , 18602 , 18593 , 18608 , 18518 , 18517 , 18596 , 19254 , 19253 , 19252 , 18853 , 19004 , 19003 , 18852 , 18851 , 18850 , 19002 , 19005 , 18849 , 18847 , 18856 , 18854 ) ) AND ( :ORDERID = A.ORDERID) ORDER BY 12 DESC , A.F_COL , B.F_COL |
6nq3t1uk8bkry |
SELECT IGPNO, CONTRACT_NO, VEND_CODE, DTL_DESC, PLANNO, IGP_REM, VEHNO, DRIVER FROM ( SELECT IGPNO, processing.get_lot_party(PLANNO, LOTNO, 'CONTRACT') CONTRACT_NO, processing.get_lot_party(PLANNO, LOTNO, 'VEND_CODE') VEND_CODE, processing.get_lot_party(PLANNO, LOTNO, 'PARTY') DTL_DESC, 3501 DEPT_CODE, PLANNO, IGP_REM, VEHNO, DRIVER FROM PROCESSING.PROD_MST D WHERE STATUS='A' AND IGPNO IS NOT NULL AND ENTRY_TYPE='DIS' AND NOT EXISTS (SELECT 1 FROM FAB_SR_MAST WHERE NVL(IGP_OGP_NO, 0)=D.IGPNO ) AND D.FIN_STORE=DECODE(:1, 'FAB_USMAN', 1, 'FAB_TARIQ', 2, 'FAB_ZAIN', 5, 'FAB_ALI', 15, 'FAB_MALI', 20, 'FAB_SAFDAL', 21, 'FAB_AHSAN', 14, '') union all SELECT D.DOC_NO, processing.get_lot_party(PLANNO, LOTNO, 'CONTRACT') CONTRACT_NO, processing.get_lot_party(PLANNO, LOTNO, 'VEND_CODE') VEND_CODE, processing.get_lot_party(PLANNO, LOTNO, 'PARTY') DTL_DESC, 3501 DEPT_CODE, PLANNO, '' IGP_REM, '' VEHNO, '' DRIVER FROM PROCESSING.PROD_MST D WHERE STATUS='A' AND ENTRY_TYPE='DI
S' AND NOT EXISTS (SELECT 1 FROM FAB_SR_MAST WHERE NVL(IGP_OGP_NO, 0)=D.DOC_NO ) /*AND OGPNO IS NULL */ AND (PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:2, 'FAB_ALI5', 23, '') OR PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:3, 'FAB_ALI5', 25, '') OR PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:4, 'FAB_NADEEM5', 25, '') OR PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:5, 'FAB_NADEEM5', 23, '') OR PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:6, 'FAB_K5A', 25, '')) AND D.DOC_DATE>='22-APR-2013' UNION ALL SELECT D.DOC_NO, processing.get_lot_party(PLANNO, LOTNO, 'CONTRACT') CONTRACT_NO, processing.get_lot_party(PLANNO, LOTNO, 'VEND_CODE') VEND_CODE, processing.get_lot_party(PLANNO, LOTNO, 'PARTY') DTL_DESC, 3501 DEPT_CODE, PLANNO, '' IGP_REM, '' VEHNO, '' DRIVER FROM PROCESSING.PROD_MST D WHERE STATUS='A' AND ENTRY_TYPE='DIS' AND NOT EXISTS (SELECT 1 FROM FAB_SR_MAST WHERE NVL(IGP_OGP_NO, 0)=D.DOC_NO ) /*AND OGPNO IS NULL */ AND (PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:7, 'FAB_NAVEED', 10, ''
) or PRODUCTION.GET_PLAN_CCODE(PLANNO)=DECODE(:8, 'FAB_NAVEED', 22, '') ) ) ORDER BY IGPNO DESC |
73mzjsxgt8kdb | SELECT NVL(SUM(H.QTY), 0) QTY FROM TBLPLANORDER O, KCL_PO_HITS H WHERE O.ORDER_NO=H.PONO AND O.PLAN_NO=:B2 AND H.GARID=:B1 |
751yt8f5vvzss | SELECT NVL(SUM(M.STITCHED_QTY), 0) FROM OPR_WAGES_EMP_MASTER M, CUT_SUPLY_BUNDL_M MI, CUT_SUPLY_BUNDL DI WHERE MI.DOC_ID = DI.DOC_ID AND M.CUT_BUNDLE_ID = DI.SR# AND MI.ENTRY_TYPE = 'IITS' AND M.UNIT_NUM = :b1 AND MI.FLOW_ID = :b2 AND M.CCODE = :b3 AND M.DATED = :b4 GROUP BY M.CCODE, M.UNIT_NUM, MI.FLOW_ID, TRUNC(M.DATED) |
7cc7frahtmgnx |
SELECT DECODE ( SIGN ( SUBSTR ( A . F_COL , 2 , 2 ) - SUBSTR ( B . F_COL , 2 , 2 ) ) , - 1 , NVL ( B . F , A . F ) , NVL ( A . F , B . F ) ) F , DECODE ( SIGN ( SUBSTR ( A . T_COL , 2 , 2 ) - SUBSTR ( B . T_COL , 2 , 2 ) ) , - 1 , NVL ( A . T , B . T ) , NVL ( B . T , A . T ) ) T , DECODE ( A . CURRENCY , 'PKR' , '?' , 'USD' , '$' , 'GBP' , '£' , 'EURO' , '¿' , 'HUF' , 'Ft' , 'TLY' , 'TL' , 'PLN' , 'z?' , 'CZK' , 'K?' , A . CURRENCY ) C_CUR , DECODE ( B . CURRENCY , 'PKR' , '?' , 'USD' , '$' , 'GBP' , '£' , 'EURO' , '¿' , 'HUF' , 'Ft' , 'TLY' , 'TL' , 'PLN' , 'z?' , 'CZK' , 'K?' , A . CURRENCY ) R_CUR , A . AIRPRICE , A . COST - NVL ( A . AIRPRICE , 0 ) COST , B . RETAIL , A . ORDERID , A . HITID , SUBSTR ( A . TRADETERM , 1 , 1 ) C_TR , SUBSTR ( B . TRADETERM , 1 , 1 ) R_TR , DECODE ( A . INT , 1 , 'INT' , 'MAIN' ) P_INT FROM ( SELECT INT , F , T , AIRPRICE , P COST , CURRENCY , ORDERID , HITID , TRADETERM
, F_COL , T_COL FROM UKPRICE_V V WHERE INV = 1 ) A , ( SELECT INT , F , T , AIRPRICE , P RETAIL , CURRENCY , ORDERID , HITID , TRADETERM , F_COL , T_COL FROM UKPRICE_V WHERE ENTRYTYPE = 'RETAIL' ) B WHERE ( A.ORDERID = B.ORDERID (+) AND NVL ( A.HITID , 0 ) = NVL ( B.HITID (+) , 0 ) AND NVL ( A.TRADETERM , 0 ) = NVL ( B.TRADETERM (+) , 0 ) AND ( A.F_COL BETWEEN NVL ( B.F_COL , A.F_COL ) AND NVL ( B.T_COL , A.F_COL ) OR B.F_COL BETWEEN NVL ( A.F_COL , B.F_COL ) AND NVL ( A.T_COL , B.F_COL ) ) AND A.ORDERID IN ( SELECT ORDERID FROM UKORDER WHERE ACC_ID IN ( 114 , 11 ) AND PHASE_ID IN ( 112 ) ) AND A.ORDERID IN ( 18916 , 19006 , 18920 , 18530 , 18917 , 18433 , 19255 , 18434 , 19007 , 18918 , 19256 , 18921 , 18919 , 19257 , 19008 , 18654 , 18435 , 19301 , 19302 , 19303 , 18671 , 18977 , 18976 , 18488 , 18487 , 18771 , 18484 , 18483 , 19304 , 18485 , 18609 , 18618 , 18616 , 18084 , 19264 , 19263 , 19022 , 19021 , 19020 , 19019 , 1
9266 , 19018 , 18614 , 18610 , 18613 , 18621 , 18620 , 18619 , 19272 , 19017 , 19270 , 19015 , 19269 , 19014 , 19268 , 19013 , 19267 , 19012 , 19016 , 18612 , 18167 , 18617 , 18083 , 18081 , 19189 , 19243 , 19191 , 19265 , 19011 , 18615 , 18611 , 18653 , 18088 , 18091 , 18087 , 19300 , 19299 , 19298 , 19297 , 18915 , 18975 , 18973 , 18974 , 18669 , 18768 , 18482 , 18481 , 18479 , 18480 , 18478 , 19190 , 19196 , 19262 , 19261 , 19034 , 19033 , 19032 , 19031 , 19027 , 19030 , 19306 , 19028 , 19026 , 19025 , 19024 , 19192 , 19023 , 18601 , 18655 , 19029 , 18600 , 18599 , 18597 , 18598 , 18603 , 18595 , 18594 , 18602 , 18593 , 18608 , 18085 , 18089 , 18090 , 18086 , 18168 , 18082 , 18080 , 18518 , 18517 , 18596 , 19254 , 19253 , 19252 , 18853 , 19004 , 19003 , 18852 , 18851 , 18529 , 18850 , 19002 , 19005 , 18849 , 18847 , 18422 , 18493 , 18856 , 18591 , 18854 , 18590 , 18420 , 18
421 , 18146 ) ) AND ( :ORDERID = A.ORDERID) ORDER BY 12 DESC , A.F_COL , B.F_COL |
7grsf923r1m4g | select distinct Z.ACT_SIZE S, Z.COL SIZ, ORD from planno_size_qty_view Z where plan_no = :1 and z.req_qty>0 ORDER BY ORD |
869nxpw7xhbyq | SELECT DISTINCT DOC_ID FROM WAREHOUSE_REC WHERE TRAN_REF = :b1 AND DOC_ID IS NOT NULL UNION ALL SELECT DISTINCT DOCNO FROM STIT_REC_ISSUE_M WHERE DOC_ID = :b1 AND DOCNO IS NOT NULL UNION ALL SELECT DISTINCT DOC_ID FROM WAREHOUSE_REC_SUB WHERE TRAN_REF = :b1 AND DOC_ID IS NOT NULL |
8k4xz9kr1brkt | SELECT NVL(MAX(OPR_DTL_ID), 0) + 1 FROM OPR_WAGES_EMP_DTL |
8mq98wyhh24ru | INSERT INTO cut_suply_bundl_m(ENTRY_TYPE, PLANNO, ORDER#, UNIT#, CCODE, STATUS, DOC_ID, timestamp_id, USER_ID, TERMINAL_ID, ISSUE#, RET_NORET, DOC_SR, P_CCODE, garment_id, FLOW_ID) VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16) |
8r6x06b59nuyt |
/* MV_REFRESH (INS) */INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "PRODUCTION"."WAGES_SHEET_MV"("PLANNO", "OPRATION_ID", "DATED", "CCODE", "FLOW_ID", "UNIT_NUM", "EMPCODE", "EARN_AMT") SELECT "M"."PLANNO", "D"."OPRATION_ID", TRUNC("M"."DATED"), "M"."CCODE", "SMT"."FLOW_ID", "M"."UNIT_NUM", "D"."EMP_CODE", SUM(ROUND("M"."STITCHED_QTY"/12, 2)) FROM "OPR_WAGES_EMP_MASTER" "M", "OPR_WAGES_EMP_DTL" "D", "STIT_REC_ISSUE_M" "SMT", "STIT_REC_ISSUE_D" "SDT" WHERE "M"."OPR_MAIN_ID"="D"."OPR_MAIN_ID" AND "D"."EMP_CODE" IS NOT NULL AND "SMT"."DOC_ID"="SDT"."DOC_ID" AN
D "SMT"."DOCUMENT_TYPE"='STR' AND "SDT"."SR#"="M"."CUT_BUNDLE_ID" AND TRUNC("M"."DATED")>'01-JUL-2013' GROUP BY "D"."EMP_CODE", "M"."UNIT_NUM", "SMT"."FLOW_ID", TRUNC("M"."DATED"), "M"."CCODE", "M"."PLANNO", "D"."OPRATION_ID" |
8v883pux05qk6 | INSERT INTO OPR_WAGES_EMP_MASTER(OPR_MAIN_ID, PLANNO, DATED, CARD_NUM, STITCHED_QTY, CUT_BUNDLE_ID, CCODE, CARD_QTY, unit_NUM, GARMENT_ID, AUTHORIZED_EMP_CODE, PAID) VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12) |
932827s2cyx97 | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin PRODUCTION.ACTIVITY_TABLE_DATA; end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
95hp4vzj95d6b | /* MV_REFRESH (DEL) */ delete from "PRODUCTION"."WAGES_SHEET_MV" |
9pc5hdmqdgx9j | UPDATE tblhrmemployee SET EMPCODE=:1, EMPNAME=:2, FNAME=:3, CCODE=:4, NIC=:5, OLDNIC=:6, EXM=:7, LATE_EXM=:8, GM_ATT=:9, DOB=:10, DEPTCODE=:11, DESIGCODE=:12, HOMEADDRESS=:13, CITY=:14, PERMANENTADDRESS=:15, REFRENCE=:16, CELLNO=:17, MOB_CARD_WEFDATE=:18, PERSONALEMAIL=:19, STATUS=:20, EMPTYPE=:21, PHONE=:22, NTNNO=:23, PROBOTIONPERIOD=:24, ENDPRODATE=:25, REASON=:26, LEAVINGDATE=:27, BGROUP=:28, RPLC_CODE=:29, RELIGION=:30, GENDER=:31, SSNO=:32, EOBINO=:33, OTALLOW=:34, RESTDAY=:35, SHIFT=:36, EMPCODE_OLD=:37, TEMPBLOCK=:38, NIGHTSHIFT=:39, HANDITYPE=:40, HANDICAP=:41, IM_BOSS=:42, INDEXDIS=:43, TOTALSALARY=:44, FORNIGHT=:45, SALMODE=:46, BANKID=:47, BRANCHID=:48, ACCOUNTNO=:49, MODIFYDATE=:50, MODIFYBY=:51, TEMPCODE=:52, MOB_CARD=:53, FUEL=:54, GUN_ALLOUNCE=:55, VEHICLE_MAIN=:56, CNIC_EXPIRY_DATE=:57, JOINIGDATE=:58, MOTHER_NAME=:59 WHERE ROWID=:60 |
ab21w6xh2m3r2 | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin DBMS_SNAPSHOT.REFRESH( 'PROCESSING.mv_gstk'); end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
axqbs2kdrnra7 | INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "PRODUCTION"."MV_STITCHING" select distinct trunc(t.dated) dated, TO_CHAR(t.DATED, 'MON-RRRR') MTH, TO_CHAR(t.DATED, 'RRRR') YR, to_number(TO_CHAR(t.DATED, 'MM'))mt, C.CUS_NAME, P.PHASE_DESC, V.c_Name, t.planno, dept_code_validation(t.unit_num) unit, g.GARMANT_DESCRIPTION PRODUCT, nvl(GET_SAM(t.planno, t.garment_id), 0) SAM, sum(t.stitched_qty) Sth_qty from opr_wages_emp_master t, tblplanorder o, kcl_po_main m, GARMENT_TYPE g, CUSTOMER C, PHASE P, cdtl v where o.plan_no=t.planno and m.pono=o.order_no and t.garment_id=g.garment_id and c.cus_id=m.cus_id and p.phase_id=m.phase_id and v.c_code=t.ccode group by TO_CHAR(t.DATED, 'MON-RRRR'), TO_CHAR(t.DATED, 'RRRR') , to_number(TO_CHAR(t.DATED, 'MM')), C.CUS_NAME, P.PHASE_DESC, v.c_name, g.GARMANT_DESCRIPTION , t.planno, t.unit_num, t.garment_id, trunc(t.dated) |
c6rkc2anypq67 | SELECT SUM(NVL(QTY_IN, 0)-NVL(QTY_OUT, 0)) FROM ST_MST A, ST_DTL B WHERE A.ENTRY_NO=B.ENTRY_NO AND TRUNC(A.DATED) BETWEEN '13-DEC-12' AND :B3 AND B.PO_NO=:B2 AND B.ITEM_CODE=:B1 AND A.ENTRY_TYPE IN ('RST', 'IFD') |
c9tu6v6ynpzgs |
SELECT TO_NUMBER(O.PLAN_NO) PLAN_NO, A.COL, A.SIZ, Z.ORD, SUM(Z.S1) PO_QTY, SUM(Z.S1) + ROUND(SUM(Z.S1) * MAX(O.WASTE) / 100, 0) PLAN_QTY, NVL(CT.CUT_QTY, 0) CUT_QTY, NVL(IND.IND_QTY, 0) IND_QTY, NVL(CT.CUT_QTY, 0) - NVL(IND.IND_QTY, 0) REJ_AUDT, NVL(ST.ST_QTY, 0) ST_QTY, NVL(MIS.MI_QTY, 0) MIS_QTY, NVL(ST.ST_QTY, 0)-NVL(WH.WH_QTY, 0)BAL_UNIT, NVL(WH.WH_QTY, 0) WH_QTY, NVL(TR_WH.TR_QTY, 0) TR_QTY, NVL(SH.SH_QTY, 0) SH_QTY, NVL((NVL(WH.WH_QTY, 0)+NVL(TR_WH.TR_QTY, 0))-SH.SH_QTY, 0) BAL_WH, S.CUT_STATUS, S.IND_STATUS, S.STIT_STATUS, S.PLAN_STATUS FROM KCL_PO_MAIN M, ACC_SIZE_VIEW A, TBLPLANORDER O, PLAN_STATUS S, ( SELECT PONO, GARID, COL, NVL(SUM(SIZ), 0) S1, RN ORD FROM ( SELECT T.PONO, T.GARID, DECODE(RN, 1, 'S1', 2, 'S2', 3, 'S3', 4, 'S4', 5, 'S5', 6, 'S6', 7, 'S7', 8, 'S8', 9, 'S9', 10, 'S10', 11, 'S11', 12, 'S12', 13, 'S13', 14, 'S14', 15, 'S15', 16, 'S16', 17, 'S17', 18, 'S18', 19, 'S19', 20, 'S20' ) COL, DECODE(RN, 1, S1, 2, S2, 3, S3, 4, S4, 5, S5,
6, S6, 7, S7, 8, S8, 9, S9, 10, S10, 11, S11, 12, S12, 13, S13, 14, S14, 15, S15, 16, S16, 17, S17, 18, S18, 19, S19, 20, S20 ) SIZ, RN FROM KCL_PO_HITS T, TBLPLANORDER O, (SELECT LEVEL RN FROM DUAL CONNECT BY LEVEL <= 20) WHERE O.PLAN_NO=:B1 AND O.ORDER_NO=T.PONO ) GROUP BY PONO, GARID, COL, RN ) Z, (SELECT CD.COL_SIZE, CD.CUT_SIZE, NVL(SUM(CD.BDL_QTY), 0)- SUM( (SELECT NVL(SUM(DD.REP_QTY), 0) FROM CUT_JBCARD_M MM, CUT_JBCARD_DDD DD WHERE DD.DOC_ID=MM.DOC_ID AND MM.PLAN_NO=:B1 AND DD.PKEY_REF=CD.PKEY AND DD.CUT_SIZE IS NOT NULL )) CUT_QTY FROM CUT_JBCARD_M CM, CUT_JBCARD_DDD CD WHERE CD.DOC_ID=CM.DOC_ID AND CM.PLAN_NO=:B1 AND CD.CUT_SIZE IS NOT NULL GROUP BY CD.COL_SIZE, CD.CUT_SIZE )CT, ( SELECT SD.COL_SIZE, SD.G_SIZE, SUM(SD.QTY) IND_QTY FROM STIT_REC_ISSUE_D SD, STIT_REC_ISSUE_M MD WHERE MD.DOC_ID=SD.DOC_ID AND MD.DOCUMENT_TYPE='STR' AND SD.STATUS=0 AND MD.PLANNO=:B1 GROUP BY SD.COL_SIZE, SD.G_SIZE )IND, (SELECT BD.COL_SIZE, BD.G_SIZE, NVL(SUM(BD.STITCHED_QTY), 0) ST_QTY FR
OM CUT_SUPLY_BUNDL BD, CUT_SUPLY_BUNDL_M MS WHERE MS.DOC_ID=BD.DOC_ID AND MS.ENTRY_TYPE='IITS' AND MS.PLANNO=:B1 GROUP BY BD.COL_SIZE, BD.G_SIZE ) ST, (SELECT COL, NVL(SUM(SIZ), 0) WH_QTY FROM ( SELECT DECODE(RN, 1, 'S1', 2, 'S2', 3, 'S3', 4, 'S4', 5, 'S5', 6, 'S6', 7, 'S7', 8, 'S8', 9, 'S9', 10, 'S10', 11, 'S11', 12, 'S12', 13, 'S13', 14, 'S14', 15, 'S15', 16, 'S16', 17, 'S17', 18, 'S18', 19, 'S19', 20, 'S20' ) COL, DECODE(RN, 1, S1, 2, S2, 3, S3, 4, S4, 5, S5, 6, S6, 7, S7, 8, S8, 9, S9, 10, S10, 11, S11, 12, S12, 13, S13, 14, S14, 15, S15, 16, S16, 17, S17, 18, S18, 19, S19, 20, S20 ) SIZ FROM WAREHOUSE_REC_D T, WAREHOUSE_REC O, (SELECT LEVEL RN FROM DUAL CONNECT BY LEVEL <= 20) WHERE O.PLANNO=:B1 AND O.DOC_ID=T.DOC_ID AND O.DOCUMENT_TYPE='WRS' UNION ALL SELECT DECODE(RN, 1, 'S1', 2, 'S2', 3, 'S3', 4, 'S4', 5, 'S5', 6, 'S6', 7, 'S7', 8, 'S8', 9, 'S9', 10, 'S10', 11, 'S11', 12, 'S12', 13, 'S13', 14, 'S14', 15, 'S15', 16, 'S16', 17, 'S17', 18, 'S18', 19, 'S19', 20, 'S2
0' ) COL, DECODE(RN, 1, -S1, 2, -S2, 3, -S3, 4, -S4, 5, -S5, 6, -S6, 7, -S7, 8, -S8, 9, -S9, 10, -S10, 11, -S11, 12, -S12, 13, -S13, 14, -S14, 15, -S15, 16, -S16, 17, -S17, 18, -S18, 19, -S19, 20, -S20 ) SIZ FROM WAREHOUSE_REC_D T, WAREHOUSE_REC O, (SELECT LEVEL RN FROM DUAL CONNECT BY LEVEL <= 20) WHERE O.PLANNO=:B1 AND O.DOC_ID=T.DOC_ID AND O.DOCUMENT_TYPE='WHS' ) GROUP BY COL )WH , (SELECT DECODE(RN, 1, 'S1', 2, 'S2', 3, 'S3', 4, 'S4', 5, 'S5', 6, 'S6', 7, 'S7', 8, 'S8', 9, 'S9', 10, 'S10', 11, 'S11', 12, 'S12', 13, 'S13', 14, 'S14', 15, 'S15', 16, 'S16', 17, 'S17', 18, 'S18', 19, 'S19', 20, 'S20' ) COL, DECODE(RN, 1, SUM(S1), 2, SUM(S2), 3, SUM(S3), 4, SUM(S4), 5, SUM(S5), 6, SUM(S6), 7, SUM(S7), 8, SUM(S8), 9, SUM(S9), 10, SUM(S10), 11, SUM(S11), 12 , SUM(S12), 13, SUM(S13), 14, SUM(S14), 15, SUM(S15), 16, SUM(S16), 17, SUM(S17), 18, SUM(S18), 19, SUM(S19), 20, SUM(S20) ) SH_QTY FROM (SELECT M.PL_NO, M.PONO, M.CCODE, NVL (SUM (D.S1 * (D.TCTN - D.FCTN + 1)), 0)
S1, NVL (SUM (D.S2 * (D.TCTN - D.FCTN + 1)), 0) S2, NVL (SUM (D.S3 * (D.TCTN - D.FCTN + 1)), 0) S3, NVL (SUM (D.S4 * (D.TCTN - D.FCTN + 1)), 0) S4, NVL (SUM (D.S5 * (D.TCTN - D.FCTN + 1)), 0) S5, NVL (SUM (D.S6 * (D.TCTN - D.FCTN + 1)), 0) S6, NVL (SUM (D.S7 * (D.TCTN - D.FCTN + 1)), 0) S7, NVL (SUM (D.S8 * (D.TCTN - D.FCTN + 1)), 0) S8, NVL (SUM (D.S9 * (D.TCTN - D.FCTN + 1)), 0) S9, NVL (SUM (D.S10 * (D.TCTN - D.FCTN + 1)), 0) S10, NVL (SUM (D.S11 * (D.TCTN - D.FCTN + 1)), 0) S11, NVL (SUM (D.S12 * (D.TCTN - D.FCTN + 1)), 0) S12, NVL (SUM (D.S13 * (D.TCTN - D.FCTN + 1)), 0) S13, NVL (SUM (D.S14 * (D.TCTN - D.FCTN + 1)), 0) S14, NVL (SUM (D.S15 * (D.TCTN - D.FCTN + 1)), 0) S15, NVL (SUM (D.S16 * (D.TCTN - D.FCTN + 1)), 0) S16, NVL (SUM (D.S17 * (D.TCTN - D.FCTN + 1)), 0) S17, NVL (SUM (D.S18 * (D.TCTN - D.FCTN + 1)), 0) S18, NVL (SUM (D.S19 * (D.TCTN - D.FCTN + 1)), 0) S19, NVL (SUM (D.S20 * (D.TCTN - D.FCTN + 1)), 0) S20 FROM EXPIMP.WPL_MST M, E
XPIMP.WPL_DTL D, PRODUCTION.TBLPLANORDER PS, EXPIMP.EXPINV_MST E, EXPIMP.EXPINV_DTL_PL P WHERE M.PL_NO = D.PL_NO AND M.PACK_TYPE = 'WP' AND M.PONO = PS.ORDER_NO AND P.INV_NO = E.INV_NO AND E.CANCEL_STATUS = 'N' AND M.PACK_TYPE = 'WP' AND E.APPROVED = 1 AND M.PL_NO=P.PL_NO AND PS.PLAN_NO =:B1 GROUP BY M.PL_NO, M.PONO, M.CCODE UNION ALL SELECT M.PL_NO, D.PONO, M.CCODE, NVL(SUM(D.SI), 0) S1, NVL(SUM(D.S2), 0) S2, NVL(SUM(D.S3), 0) S3, NVL(SUM(D.S4), 0) S4, NVL(SUM(D.S5), 0) S5, NVL(SUM(D.S6), 0) S6, NVL(SUM(D.S7), 0) S7, NVL(SUM(D.S8), 0) S8, NVL(SUM(D.S9), 0) S9, NVL(SUM(D.S10), 0) S10, NVL(SUM(D.S11), 0) S11, NVL(SUM(D.S12), 0) S12, NVL(SUM(D.S13), 0) S13, NVL(SUM(D.S14), 0) S14, NVL(SUM(D.S15), 0) S15, NVL(SUM(D.S16), 0) S16, NVL(SUM(D.S17), 0) S17, NVL(SUM(D.S18), 0) S18, NVL(SUM(D.S19), 0) S19, NVL(SUM(D.S20), 0) S20 FROM EXPIMP.WPL_MST M, WPL_DTL_AEOPO D, PRODUCTION.TBLPLANORDER PS, EXPIMP.EXPINV_MST E, EXPIMP.EXPINV_DTL_PL P WHERE
M.PL_NO = D.PL_NO AND M.PACK_TYPE = 'WP' AND D.PONO = PS.ORDER_NO AND P.INV_NO = E.INV_NO AND E.CANCEL_STATUS = 'N' AND M.PACK_TYPE = 'WP' AND E.APPROVED = 1 AND PS.PLAN_NO = :B1 AND P.PL_NO=M.PL_NO GROUP BY M.PL_NO, D.PONO, M.CCODE UNION ALL SELECT M.PL_NO, M.PONO, M.CCODE, NVL(SUM(D.S1), 0) S1, NVL(SUM(D.S2), 0) S2, NVL(SUM(D.S3), 0) S3, NVL(SUM(D.S4), 0) S4, NVL(SUM(D.S5), 0) S5, NVL(SUM(D.S6), 0) S6, NVL(SUM(D.S7), 0) S7, NVL(SUM(D.S8), 0) S8, NVL(SUM(D.S9), 0) S9, NVL(SUM(D.S10), 0) S10, NVL(SUM(D.S11), 0) S11, NVL(SUM(D.S12), 0) S12, NVL(SUM(D.S13), 0) S13, NVL(SUM(D.S14), 0) S14, NVL(SUM(D.S15), 0) S15, NVL(SUM(D.S16), 0) S16, NVL(SUM(D.S17), 0) S17, NVL(SUM(D.S18), 0) S18, NVL(SUM(D.S19), 0) S19, NVL(SUM(D.S20), 0) S20 FROM EXPIMP.WPL_MST M, EXPIMP.WPL_DTL D, PRODUCTION.TBLPLANORDER PS, EXPIMP.EXPINV_MST E, EXPIMP.EXPINV_DTL_PL P WHERE M.PL_NO = D.PL_NO AND M.PACK_TYPE = 'WP' AND NVL(D.NET_WGT, 0) > 0 AND NVL(D.GROSS_WGT, 0)
> 0 AND M.PONO = PS.ORDER_NO AND P.INV_NO = E.INV_NO AND E.CANCEL_STATUS = 'N' AND M.PACK_TYPE = 'WP' AND E.APPROVED = 1 AND PS.ORDER_NO = M.PONO AND P.PL_NO = M.PL_NO AND PS.PLAN_NO = :B1 GROUP BY M.PL_NO, M.PONO, M.CCODE ), (SELECT LEVEL RN FROM DUAL CONNECT BY LEVEL <= 20) GROUP BY RN )SH, (SELECT DECODE(RN, 1, 'S1', 2, 'S2', 3, 'S3', 4, 'S4', 5, 'S5', 6, 'S6', 7, 'S7', 8, 'S8', 9, 'S9', 10, 'S10', 11, 'S11', 12, 'S12', 13, 'S13', 14, 'S14', 15, 'S15', 16, 'S16', 17, 'S17', 18, 'S18', 19, 'S19', 20, 'S20' ) COL, DECODE(RN, 1, SUM(S1), 2, SUM(S2), 3, SUM(S3), 4, SUM(S4), 5, SUM(S5), 6, SUM(S6), 7, SUM(S7), 8, SUM(S8), 9, SUM(S9), 10, SUM(S10), 11, SUM(S11), 12 , SUM(S12), 13, SUM(S13), 14, SUM(S14), 15, SUM(S15), 16, SUM(S16), 17, SUM(S17), 18, SUM(S18), 19, SUM(S19), 20, SUM(S20) ) TR_QTY FROM ( SELECT NVL(T.S1, 0)S1, NVL(T.S2, 0)S2, NVL(T.S3, 0)S3, NVL(T.S4, 0)S4, NVL(T.S5, 0)S5 , NVL(T.S6, 0)S6, NVL(T.S7, 0)S7, NVL(T.S8, 0)S8, NVL(T.S9, 0)S9, NVL(T.S10, 0)S10 , NV
L(T.S11, 0)S11, NVL(T.S12, 0)S12, NVL(T.S13, 0)S13, NVL(T.S14, 0)S14 , NVL(T.S15, 0)S15, NVL(T.S16, 0)S16, NVL(T.S17, 0)S17, NVL(T.S18, 0)S18, NVL(T.S19, 0)S19, NVL(T.S20, 0)S20 FROM WPL_DTL_NEW T WHERE T.TIN_PLANNO=:B1 UNION ALL SELECT -NVL(T.S1, 0)S1, -NVL(T.S2, 0)S2, -NVL(T.S3, 0)S3, -NVL(T.S4, 0)S4, -NVL(T.S5, 0)S5 , -NVL(T.S6, 0)S6, -NVL(T.S7, 0)S7, -NVL(T.S8, 0)S8, -NVL(T.S9, 0)S9, -NVL(T.S10, 0)S10 , -NVL(T.S11, 0)S11, -NVL(T.S12, 0)S12, -NVL(T.S13, 0)S13, -NVL(T.S14, 0)S14 , -NVL(T.S15, 0)S15, -NVL(T.S16, 0)S16, -NVL(T.S17, 0)S17, -NVL(T.S18, 0)S18, -NVL(T.S19, 0)S19, -NVL(T.S20, 0)S20 FROM WPL_DTL_NEW T WHERE T.TOUT_PLANNO=:B1 ), (SELECT LEVEL RN FROM DUAL CONNECT BY LEVEL <= 20) GROUP BY RN ) TR_WH , (SELECT T.G_SIZE SI, COUNT(T.G_SIZE) MI_QTY FROM MISSED_GMT_ID T WHERE T.PLAN_NO = :B1 GROUP BY T.G_SIZE )MIS WHERE A.ACC_ID=M.ACC_ID AND Z.PONO=M.PONO AND O.ORDER_NO=M.PONO AND O.ORDER_NO=Z.PONO AND O.PLAN_NO=:B1 AND Z.COL=A.COL AND A.COL=CT.COL_SIZE(+) AND A.COL=IND.COL_SIZ
E(+) AND A.COL=ST.COL_SIZE(+) AND A.COL=WH.COL(+) AND A.COL=SH.COL(+) AND A.COL=TR_WH.COL(+) AND A.SIZ=MIS.SI(+) AND S.PLAN_NO=O.PLAN_NO AND A.SIZ IS NOT NULL GROUP BY O.PLAN_NO, A.COL, A.SIZ, Z.ORD, CT.CUT_QTY, IND.IND_QTY, ST.ST_QTY, WH.WH_QTY, SH.SH_QTY, TR_WH.TR_QTY, MIS.MI_QTY, S.CUT_STATUS, S.IND_STATUS, S.STIT_STATUS, S.PLAN_STATUS HAVING SUM(Z.S1) >0 ORDER BY Z.ORD |
cd6srfubmwu53 |
SELECT U.COL , U.PLAN_NO , U.G_SZ , U.RQ_QT , U.CT_PCS , U.ID_QTY , U.ST_QTY , U.QTY PAK_QTY FROM ( SELECT T.PLAN_NO PLAN_NO , T.ACT_SIZE G_SZ , T.REQ_QTY RQ_QT , T.TO_CUT_PCS CT_PCS , Z.ID_QTY , Y.ST_QTY , W.QTY , T.COL FROM ACT_CUT_PCS_VIEW T , ( SELECT M.PLANNO , D.G_SIZE , SUM ( D.QTY ) ID_QTY FROM STIT_REC_ISSUE_M M , STIT_REC_ISSUE_D D WHERE D.DOC_ID = M.DOC_ID AND M.DOCUMENT_TYPE = 'STR' AND D.STATUS = 0 GROUP BY M.PLANNO , D.G_SIZE ) Z , ( SELECT V.PLAN_NO , V.CCODE , T.ACT_SIZE , V.S1 QTY FROM SHIP_SIZE_VIEW V , ACT_CUT_PCS_VIEW T WHERE T.PLAN_NO = V.PLAN_NO AND T.COL = V.S ) W , ( SELECT M.PLANNO , D.G_SIZE , SUM ( D.STITCHED_QTY ) ST_QTY FROM CUT_SUPLY_BUNDL_M M , CUT_SUPLY_BUNDL D WHERE D.DOC_ID = M.DOC_ID AND D.ENT_TYPE = 'IITS' AND D.STITCHED_QTY IS NOT NULL GROUP BY M.PLANNO , D.G_SIZE ) Y , TBLPLANSHEET PS WHERE T.REQ_QTY > 0 AND T.PLAN_NO = Z.PLANNO (+) AND T.ACT_SIZE = Z.G_SIZE (+) AND T.PLAN_NO = Y.PLANNO (+) AND T.ACT_SIZE = Y.G_SIZE
(+) AND T.PLAN_NO = W.PLAN_NO (+) AND T.ACT_SIZE = W.ACT_SIZE (+) AND T.PLAN_NO = PS.PLAN_NO AND PS.C_CODE = 9 ) U WHERE ( :PLAN_NO = U.PLAN_NO) ORDER BY U.COL |
cdy4c52fdcanv | SELECT DISTINCT D.PO_NO, D.ITEM_CODE, SUBSTR(PRODUCTION.GET_YARN(D.ITEM_CODE), 1, 100)ITEM_DESC , PROCESSING.ST_YARN_STK(:P_TO, D.PO_NO, D.ITEM_CODE, :P_STK)STK FROM PROCESSING.ST_MST M, PROCESSING.ST_DTL D WHERE M.ENTRY_NO=D.ENTRY_NO AND TRUNC(M.DATED)<=:P_TO AND TO_NUMBER(SUBSTR(D.ENTRY_NO, 4, 2))=:P_CCODE AND D.ITEM_CODE=NVL(:P_ITEM, D.ITEM_CODE) AND PROCESSING.ST_YARN_STK(:P_TO, D.PO_NO, D.ITEM_CODE, :P_STK)<>0 |
ch0thvp9q6y1w | SELECT DISTINCT T.PLAN_NO, T.PLAN_DATE, to_char(WM_CONCAT(DISTINCT ORDER_NO))PAKPO FROM TBLPLANSHEET T, tblplanorder o WHERE T.PLAN_DATE >='01-JAN-2011' and T.PLAN_NO=O.PLAN_NO GROUP BY T.PLAN_NO, T.PLAN_DATE /*AND UNIT=decode(:GLOBAL.COMPANY_CODE, 13, unit, :GLOBAL.COMPANY_CODE)*/ ORDER BY T.PLAN_DATE DESC |
cjaa80k1hvpc1 | select 1 from sys.cdc_change_tables$ where source_schema_name = :1 and source_table_name = :2 and bitand(mvl_flag, 128)=128 |
cm5vu20fhtnq1 | 獥汥捴 ⨫潮湥捴形祟晩汴敲楮朠⨯⁰物癩汥来⌬汥癥氠晲潭祳慵瑨␠捯湮散琠批牡湴敥⌽灲楯爠灲楶楬敧攣湤⁰物癩汥来⌾〠獴慲琠睩瑨牡湴敥⌽㨱湤⁰物癩汥来⌾ |
d119jxynhx8ba |
SELECT PONO, DTL_DESC, DEMANDNO, ITEMCODE, ITEM_DESC, PLANNO, SUM(QTY), SUM(REC), SUM(RET) FROM ( SELECT M.PONO, V.DTL_DESC, D.DEMANDNO, D.ITEMCODE, I.ITEM_DESC, D.PLANNO, SUM(D.POQTY) QTY, 0 REC, 0 RET FROM PO_MST M, PO_DTL D, ITEM I, DYE.DETAILACC V, DEM_MST DM WHERE D.PONO = M.PONO AND D.CCODE = M.CCODE AND D.DEMANDNO=DM.DEMANDNO AND D.ITEMCODE = I.ITEM_CODE AND M.VENDCODE = V.DTL_CODE AND M.CCODE = V.CCODE AND decode(Fack_company_plan_po(D.planno), 0, m.ccode, Fack_company_plan_po(D.planno)) =:P_CCODE AND M.APPROVED = 1 AND M.PODATE BETWEEN :P_FROM AND :P_TO AND M.VENDCODE = NVL(:P_VEND, M.VENDCODE) AND D.PLANNO = NVL(:P_PLANNO, D.PLANNO) AND NVL(M.PURCODE, 0) = NVL(:P_PURCHASE, NVL(M.PURCODE, 0)) AND D.ITEMCODE LIKE DECODE(:P_CAT, '', '%', :P_CAT) AND NVL(DM.UNIT, 0) =NVL(:P_UNIT, NVL(DM.UNIT, 0)) GROUP BY M.PONO, V.DTL_DESC, D.DEMANDNO, D.ITEMCODE, I.ITEM_DESC, PLANNO UNION ALL SELECT M.PONO, V.DTL_DESC, D.DEMANDNO, D.ITEM_CODE, I.ITEM_DESC, D.PLAN_NO, 0 QTY, NVL(SUM(D.IGPQTY)
, 0) REC, 0 RET FROM IGP_MST M, IGP_DTL D, ITEM I, DYE.DETAILACC V, DEM_MST DM WHERE M.IGPNO = D.IGPNO AND M.CCODE = D.CCODE AND D.DEMANDNO=DM.DEMANDNO AND decode(Fack_company_plan_po(D.plan_no), 0, m.ccode, Fack_company_plan_po(D.plan_no)) =:P_CCODE AND D.ITEM_CODE=I.ITEM_CODE AND M.VEND_CODE=V.DTL_CODE AND M.CCODE=V.CCODE AND M.VEND_CODE = NVL(:P_VEND, M.VEND_CODE) AND D.PLAN_NO = NVL(:P_PLANNO, D.PLAN_NO) AND D.ITEM_CODE LIKE DECODE(:P_CAT, '', '%', :P_CAT) AND NVL(DM.UNIT, 0) =NVL(:P_UNIT, NVL(DM.UNIT, 0)) GROUP BY M.PONO, V.DTL_DESC, D.DEMANDNO, D.ITEM_CODE, I.ITEM_DESC, PLAN_NO UNION ALL SELECT D.PODEMNO, V.DTL_DESC, P.DEMANDNO, D.ITEMCODE, I.ITEM_DESC, D.PLANNO, 0 QTY, 0 REC, SUM(D.QTY) RET FROM STORE_MASTER M, STORE_DETAIL D, PO_DTL P, ITEM I, DYE.DETAILACC V, DEM_MST DM WHERE M.SRNO = D.SRNO AND decode(Fack_company_plan_po(D.planno), 0, m.ccode, Fack_company_plan_po(D.planno)) =:P_CCODE AND D.PODEMNO=P.PONO AND P.DEMANDNO=DM.DEMANDNO AND D.ITEMCODE=P.ITEMCODE AND D.PLANNO=P.PL
ANNO AND D.ITEMCODE=I.ITEM_CODE AND M.VENDCODE=V.DTL_CODE AND M.CCODE=V.CCODE AND M.ENTRYTYPE='RR' AND M.VENDCODE = NVL(:P_VEND, M.VENDCODE) AND D.PLANNO = NVL(:P_PLANNO, D.PLANNO) AND D.ITEMCODE LIKE DECODE(:P_CAT, '', '%', :P_CAT) AND NVL(DM.UNIT, 0) =NVL(:P_UNIT, NVL(DM.UNIT, 0)) GROUP BY D.PODEMNO, V.DTL_DESC, P.DEMANDNO, D.ITEMCODE, I.ITEM_DESC, D.PLANNO ) GROUP BY PONO , DTL_DESC , DEMANDNO , ITEMCODE , ITEM_DESC , PLANNO HAVING SUM ( QTY ) - SUM ( REC ) + SUM ( RET ) > 0 ORDER BY 2 ASC, 1 ASC |
fabnkbu3vk8rp |
卅䱅䍔⁄䥓呉乃吠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䍟䍏䑅✩⁆䅂剉䍟䍏䑅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䌧⤠䙁䉒䥃彔奐䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⥃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩⁐䱁也䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䑅千剉偔䥏丧⤠䑅千剉偔䥏丬⁰牯摵捴楯渮䝅呟䙉义午归何吨䌮䍄䭟䥄⤠䙉义午归何呅Ⱐ嘮䑉䄬嘮䝕䅇䔬嘮䝓䴬嘮䙉也䝓䴬嘮䙉也坉䐬嘮䑙䕟䅖䝟坁協䔬⁃⹃䑋彉䐠䙒位⁔䉌䑙䕃低呒䅃呄呌⁃噟䍕呒䕑⁖ⱃ䑋彆䥎䥓䡟剏啔⁆⁗䡅剅⁃⹃低呒䅃呟乏㴺ㄠ䅎䐠❆䑉✽㨲⁁乄⁃⹃䑋彉䐽嘮卒乏⁁乄⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⤽㨳⁁乄‧䑙䔧㴺㐠䅎䐠❍䄧㴺㔠䅎䐠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❍䅉也䅃䌧⤠䥎⠧䴧Ⱗ䄧⤠䅎䐠䌮䍄䭟䥄㵆⹃䑋彉䐠䅎䐠䘮佒䐽⡓䕌䕃吠䵉丨佒䐩⁆剏䴠偒佄啃呉低⹃䑋彆䥎䥓䡟剏啔⁘⁗䡅剅⁘⹃䑋彉䐽䌮䍄䭟䥄 ⁁乄⁆⹐剏䍅卓彉䐠䥎⠳ⰷ⤠啎䥏丠䅌䰠卅䱅䍔⁄䥓呉乃吠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䍟䍏䑅✩⁆䅂剉䍟䍏䑅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䌧⤠䙁䉒䥃彔奐䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⥃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩⁐䱁也䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䑅千剉偔䥏丧⤠䑅千剉偔䥏丬⁇䕔彆䥎䥓䡟剏啔⡃⹃䑋彉䐩⁆䥎䥓䡟剏啔䔬⁖⹄䥁ⱖ⹇啁䝅ⱖ⹇卍ⱖ⹆䥎彇卍ⱖ⹆䥎彗䥄ⱖ⹄奅彁噇彗䅓呅Ⱐ䌮䍄䭟䥄⁆剏䴠呂䱄奅䍏乔剁䍔䑔䰠䌠ⱖ彃啔剅儠嘬䍄䭟䙉义午归何吠䘠坈䕒䔠䌮䍏乔剁䍔彎伽㨶⁁乄‧䙄䤧㴺㜠䅎䐠䌮䍄䭟䥄㵖⹓剎传䅎䐠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩㴺㠠䅎䐠❄奅✽㨹⁁乄‧䴧㴺⁁乄⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䵁䥎彁䍃✩㴧䴧⁁乄⁃⹃䑋彉䐽䘮䍄䭟䥄⁁乄⁆⹏剄㴨卅䱅䍔⁍䥎⡏剄⤠䙒位⁐剏䑕䍔䥏丮䍄䭟䙉义午归何吠堠坈䕒䔠堮䍄䭟䥄㵃⹃䑋彉䐠⤠䅎䐠䘮偒佃䕓卟䥄⁉丨㌬㜩⁕义低⁁䱌⁓䕌䕃吠䑉協䥎䍔⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䙁䉒䥃彃佄䔧⤠䙁䉒䥃彃佄䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䙁䉒䥃✩⁆䅂剉䍟呙偅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⤠偌䅎彃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❄䕓䍒䥐呉低
✩⁄䕓䍒䥐呉低Ⱐ䝅呟䙉义午归何吨䌮䍄䭟䥄⤠䙉义午归何呅Ⱐ嘮䑉䄬嘮䝕䅇䔬嘮䝓䴬嘮䙉也䝓䴬嘮䙉也坉䐬嘮䑙䕟䅖䝟坁協䔬⁃⹃䑋彉䐠䙒位⁔䉌䑙䕃低呒䅃呄呌⁃噟䍕呒䕑⁖ⱃ䑋彆䥎䥓䡟剏啔⁆⁗䡅剅⁃⹃低呒䅃呟乏㴺ㄱ⁁乄‧䙄䤧㴺ㄲ⁁乄⁃⹃䑋彉䐽嘮卒乏⁁乄⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⤽㨱㌠䅎䐠❄奅✽㨱㐠䅎䐠❁✽㨱㔠䅎䐠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❍䅉也䅃䌧⤽❁✠䅎䐠䌮䍄䭟䥄㵆⹃䑋彉䐠䅎䐠䘮佒䐽⡓䕌䕃吠䵉丨佒䐩⁆剏䴠偒佄啃呉低⹃䑋彆䥎䥓䡟剏啔⁘⁗䡅剅⁘⹃䑋彉䐽䌮䍄䭟䥄 ⁁乄⁆⹐剏䍅卓彉䐠䥎⠳ⰷ⤠啎䥏丠䅌䰠卅䱅䍔⁄䥓呉乃吠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䍟䍏䑅✩⁆䅂剉䍟䍏䑅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䌧⤠䙁䉒䥃彔奐䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⥃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩⁐䱁也䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䑅千剉偔䥏丧⤠䑅千剉偔䥏丬⁇䕔彆䥎䥓䡟剏啔⡃⹃䑋彉䐩⁆䥎䥓䡟剏啔䔬⁖⹄䥁ⱖ⹇啁䝅ⱖ⹇卍ⱖ⹆䥎彇卍ⱖ⹆䥎彗䥄ⱖ⹄奅彁噇彗䅓呅Ⱐ䌮䍄䭟䥄⁆剏䴠呂䱄奅䍏乔剁䍔䑔䰠䌠ⱖ彃啔剅儠嘬䍄䭟䙉义午归何吠䘠坈䕒䔠䌮䍏乔剁䍔彎伽㨱㘠䅎䐠❆䑉✽㨱㜠䅎䐠䌮䍄䭟䥄㵖⹓剎传䅎䐠❗䅓䠧㴺ㄸ⁁乄‧䵁✽㨱㤠䅎䐠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❍䅉也䅃䌧⤠䥎⠧䴧Ⱗ䄧⤠䅎䐠䌮䍄䭟䥄㵆⹃䑋彉䐠䅎䐠䘮佒䐽⡓䕌䕃吠䵉丨佒䐩⁆剏䴠偒佄啃呉低⹃䑋彆䥎䥓䡟剏啔⁘⁗䡅剅⁘⹃䑋彉䐽䌮䍄䭟䥄 ⁁乄⁆⹐剏䍅卓彉䐽㈠啎䥏丠䅌䰠卅䱅䍔⁄䥓呉乃吠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䍟䍏䑅✩⁆䅂剉䍟䍏䑅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䌧⤠䙁䉒䥃彔奐䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⥃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩⁐䱁也䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䑅千剉偔䥏丧⤠䑅千剉偔䥏丬⁰牯摵捴楯渮䝅呟䙉义午归何吨䌮䍄䭟䥄⤠䙉义午归何呅Ⱐ嘮䑉䄬嘮䝕䅇䔬嘮䝓䴬嘮䙉也䝓䴬嘮䙉也坉䐬嘮䑙䕟䅖䝟坁協䔬⁃⹃䑋彉䐠䙒位⁔䉌䑙䕃低呒䅃呄呌⁃噟䍕呒䕑⁖ⱃ䑋彆䥎䥓䡟剏啔⁆⁗䡅剅⁃⹃低呒䅃呟乏㴺㈰⁁乄‧䙄䤧㴺㈱⁁乄⁃⹃䑋彉䐽嘮卒乏⁁乄‧坁午✽㨲㈠䅎䐠❍✽㨲㌠䅎䐠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❍䅉也䅃䌧⤠䥎⠧䴧⤠䅎䐠䌮䍄䭟䥄㵆⹃䑋彉䐠䅎䐠䘮佒䐽⡓䕌䕃吠䵉
丨佒䐩⁆剏䴠偒佄啃呉低⹃䑋彆䥎䥓䡟剏啔⁘⁗䡅剅⁘⹃䑋彉䐽䌮䍄䭟䥄 ⁁乄⁆⹐剏䍅卓彉䐽㈠啎䥏丠䅌䰠卅䱅䍔⁄䥓呉乃吠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䍟䍏䑅✩⁆䅂剉䍟䍏䑅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䌧⤠䙁䉒䥃彔奐䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⥃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩⁐䱁也䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䑅千剉偔䥏丧⤠䑅千剉偔䥏丬⁰牯摵捴楯渮䝅呟䙉义午归何吨䌮䍄䭟䥄⤠䙉义午归何呅Ⱐ嘮䑉䄬嘮䝕䅇䔬嘮䝓䴬嘮䙉也䝓䴬嘮䙉也坉䐬嘮䑙䕟䅖䝟坁協䔬⁃⹃䑋彉䐠䙒位⁔䉌䑙䕃低呒䅃呄呌⁃噟䍕呒䕑⁖ⱃ䑋彆䥎䥓䡟剏啔⁆⁗䡅剅⁃⹃低呒䅃呟乏㴺㈴⁁乄‧䙄䤧㴺㈵⁁乄⁃⹃䑋彉䐽嘮卒乏⁁乄‧坁午✽㨲㘠䅎䐠❁✽㨲㜠䅎䐠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❍䅉也䅃䌧⤠䥎⠧䄧⤠䅎䐠䌮䍄䭟䥄㵆⹃䑋彉䐠䅎䐠䘮佒䐽⡓䕌䕃吠䵉丨佒䐩⁆剏䴠偒佄啃呉低⹃䑋彆䥎䥓䡟剏啔⁘⁗䡅剅⁘⹃䑋彉䐽䌮䍄䭟䥄 ⁁乄⁆⹐剏䍅卓彉䐽㈠啎䥏丠䅌䰠卅䱅䍔⁄䥓呉乃吠灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䍟䍏䑅✩⁆䅂剉䍟䍏䑅Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❆䅂剉䌧⤠䙁䉒䥃彔奐䔬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䍏䱏刧⥃佌佒Ⱐ灲潤畣瑩潮⹇䕔彔䉌彃啔䑙䕟䭎䥔⡃⹃䑋彉䐬❃佌佒✩⁐䱁也䍏䱏刬⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䑅千剉偔䥏丧⤠䑅千剉偔䥏丬⁰牯摵捴楯渮䝅呟䙉义午归何吨䌮䍄䭟䥄⤠䙉义午归何呅Ⱐ嘮䑉䄬嘮䝕䅇䔬嘮䝓䴬嘮䙉也䝓䴬嘮䙉也坉䐬嘮䑙䕟䅖䝟坁協䔬⁃⹃䑋彉䐠䙒位⁔䉌䑙䕃低呒䅃呄呌⁃噟䍕呒䕑⁖ⱃ䑋彆䥎䥓䡟剏啔⁆⁗䡅剅⁃⹃低呒䅃呟乏㴺㈸⁁乄‧䙄䤧㴺㈹⁁乄⁃⹃䑋彉䐽嘮卒乏⁁乄‧佔䡅刧㴺㌰⁁乄⁰牯摵捴楯渮䝅呟呂䱟䍕呄奅彋义吨䌮䍄䭟䥄Ⱗ䵁䥎彁䍃✩⁉丨❍✬❁✩⁁乄⁃⹃䑋彉䐽䘮䍄䭟䥄⁁乄⁆⹏剄㴨卅䱅䍔⁍䥎⡏剄⤠䙒位⁐剏䑕䍔䥏丮䍄䭟䙉义午归何吠堠坈䕒䔠堮䍄䭟䥄㵃⹃䑋彉䐠⤠䅎䐠䘮偒佃䕓卟䥄⁎佔⁉丨㌬㈩⁕义低⁁䱌⁓䕌䕃吠䑉協䥎䍔⁖⹆䅂剉䍟䍏䑅Ⱐ䝅呟䙁䉒䥃⡖⹆䅂剉䍟䍏䑅⤠䙁䉒䥃彔奐䔬 ⩄䕃佄䔨㩆䅂当剟䵁協⹅乔剙呙偅Ⱗ䙆䘧ⱃ⹓呋彃佌佒ⱖ⹃佌佒⤠䍏䱏刬⨯⁖⹃佌佒Ⱐ嘮䍏䱏删偌䅎彃佌佒Ⱐ嘮䑅千剉偔䥏丬⁇䕔彆䥎䥓䡟剏啔⡃⹃䑋彉䐩⁆䥎䥓䡟剏啔䔠ⱖ⹄䥁ⱖ⹇啁䝅ⱖ⹇卍ⱖ⹆䥎彇卍ⱖ⹆䥎彗䥄ⱖ⹄奅彁噇彗䅓呅ⱃ⹃䑋彉䐠䙒位⁔䉌䑙䕃低呒䅃呄呌⁃噟䍕呒䕑
⁖⁗䡅剅⁃⹃低呒䅃呟乏㴺㌱⁁乄‧䉆䘧㴺㌲⁁乄⁃⹃低呟呙偅㵄䕃佄䔨㨳㌬❆䥒✬❄奅✬❆䙆✬❆䥎✩⁁乄⁃⹃䑋彉䐽嘮卒乏 |
fn6836hwdwhwh | DECLARE job BINARY_INTEGER := :job; next_date TIMESTAMP WITH TIME ZONE := :mydate; broken BOOLEAN := FALSE; job_name VARCHAR2(30) := :job_name; job_subname VARCHAR2(30) := :job_subname; job_owner VARCHAR2(30) := :job_owner; job_start TIMESTAMP WITH TIME ZONE := :job_start; job_scheduled_start TIMESTAMP WITH TIME ZONE := :job_scheduled_start; window_start TIMESTAMP WITH TIME ZONE := :window_start; window_end TIMESTAMP WITH TIME ZONE := :window_end; chain_id VARCHAR2(14) := :chainid; credential_owner varchar2(30) := :credown; credential_name varchar2(30) := :crednam; destination_owner varchar2(30) := :destown; destination_name varchar2(30) := :destnam; job_dest_id varchar2(14) := :jdestid; log_id number := :log_id; BEGIN begin DBMS_SNAPSHOT.REFRESH( 'PRODUCTION.wages_unit_counter'); end; :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF; END; |
ghkjhqaftqt0m |
SELECT PLANNO, STYLENO, ORDERNO, CCODE, DEPTCODE, DEPT_NAME , EMPCODE, OPRCODE, QTY , RATE, EMPNAME, FNAME , OPRNAME, SUM(AMT) AMT FROM ( SELECT M.PLANNO, GET_PLAN_STYLE(M.PLANNO) STYLENO, GET_PLAN_PO(M.PLANNO) ORDERNO, M.CCODE, DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM ) DEPTCODE, DEPT_CODE_VALIDATION(DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM )) DEPT_NAME , D.EMP_CODE EMPCODE, to_char(D.OPRATION_ID) OPRCODE, SUM(M.STITCHED_QTY) QTY , GET_PLANE_OPRATION_RATE(m.PLANNO, D.OPRATION_ID) RATE, emp_code_validation(D.EMP_CODE) EMPNAME, PRODUCTION.GET_EMP_FNAME(D.EMP_CODE) as FNAME , OPERATION_ID_VALIDATION(D.OPRATION_ID) OPRNAME, SUM (round(((M.STITCHED_QTY)/12), 2)*GET_PLANE_OPRATION_RATE(m.PLANNO, D.OPRATION_ID)) as AMT FROM OPR_WAGES_EMP_MASTER M, OPR_WAGES_EMP_DTL D WHERE M.OPR_MAIN_ID=D.OPR_MAIN_ID And D.EMP_CODE is not null AND dateD BETWEEN :P_FROM AND :P_TO AND PRODUCTION.GET_EMPTYPE(D.EMP_CODE)= nvl(:EMPTYPE , PRODUCTION.GET_EMPTYPE(D.EMP_CODE)) AND M.CCODE=NVL(:P_CCODE, M.CCODE) and
m.PLANNO =NVL(:p_planno, m.PLANNO) and DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM )=nvl(:P_DEPT, DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM )) AND D.OPRATION_ID =NVL(:P_OPR, D.OPRATION_ID) group by M.CCODE, DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM ) , M.PLANNO, D.OPRATION_ID, EMP_CODE UNION ALL SELECT M.PLANNO, GET_PLAN_STYLE(M.PLANNO) STYLENO, GET_PLAN_PO(M.PLANNO) ORDERNO, M.CCODE, DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM ) DEPTCODE, DEPT_CODE_VALIDATION(DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM )) DEPT_NAME , EMPCODE, to_char(OPRATION) OPRCODE, SUM(M.STITCHED_QTY) QTY , GET_PLANE_OPRATION_RATE(m.PLANNO, OPRATION) RATE, emp_code_validation(EMPCODE) EMPNAME, PRODUCTION.GET_EMP_FNAME(EMPCODE) as FNAME , OPERATION_ID_VALIDATION(OPRATION) OPRNAME, SUM (round(((M.STITCHED_QTY)/12), 2)*GET_PLANE_OPRATION_RATE(m.PLANNO, OPRATION)) as AMT FROM OPR_WAGES_EMP_MASTER M, OPR_WAGES_EMP_M MD WHERE M.OPR_MAIN_ID=MD.OPR_MAIN_ID AND Ddate BETWEEN :P_FROM AND :P_TO AND PRODUCTION.GET_EMPTYPE(EMPCODE)= nvl(:EMPTYPE ,
PRODUCTION.GET_EMPTYPE(EMPCODE)) AND M.CCODE=NVL(:P_CCODE, M.CCODE) and m.PLANNO =NVL(:p_planno, m.PLANNO) and DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM)=nvl(:P_DEPT, DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM )) AND OPRATION =NVL(:P_OPR, OPRATION) group by M.CCODE, DECODE(UNIT_NUM, 2547, 2514, UNIT_NUM ), M.PLANNO, OPRATION, EMPCODE ) GROUP BY PLANNO , STYLENO , ORDERNO , CCODE , DEPTCODE , DEPT_NAME , EMPCODE , OPRCODE , QTY , RATE , EMPNAME , FNAME , OPRNAME ORDER BY 1 ASC, 2 ASC, 3 ASC, 5 ASC, 6 ASC, 13 ASC, 8 ASC |
gzqjxjwwthgq5 | SELECT COUNT(M.DOC_ID) FROM STIT_REC_ISSUE_M M WHERE M.DOCUMENT_TYPE = 'SSW' AND M.DOC_ID = :b1 AND NOT EXISTS (SELECT * FROM EXPIMP.WAREHOUSE_REC R WHERE R.TRAN_REF = M.DOC_ID ) UNION ALL SELECT COUNT(M.DOC_ID) FROM STIT_REC_ISSUE_M M WHERE M.DOCUMENT_TYPE = 'SSW' AND M.DOC_ID = :b1 AND NOT EXISTS (SELECT * FROM EXPIMP.WAREHOUSE_REC_SUB R WHERE R.TRAN_REF = M.DOC_ID ) |