資源描述:
《各種問題代碼解決》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在工程資料-天天文庫。
1、?儲值卡余額減掉剩余白分之10:ALTERview[dbo].[VIW_VIP]asselectA.VIPID,A.PID,A.CBDID,A.RAT,A.VIPRAT,A.VIPNO,A.SNO,A.NAME,A.RANK,A.RANK_DSC,A.DISCRAT,A.SEX,A.SEX_DSC,A.IDNO,A.ADDR,A.TEL,A.PCODE,A.BIRTH,A.VDAT,A.IS_VALID,A.IS_DC,A.IS_USEONCE,A.CAN_POINT,A.CAN_BLC,A.CAN_VIPPRC,A.COMNAME,A.DUTY,A.WORK
2、,A.MARRIED,A.TECH,A.TECH_DSC,A.1NCOME,A.1NCOME_DSC,A.AREA,A.MOBILE,A.HOBY,A.EMA1L,A.REGID,A.CREDITAMT,A.POINT,A.NATION,A.INDAT,A.INPSN,A.DSC,C.ADD_CNT,C.ADD_SUM,C.BCK_CNT,C.BCK_SUM,C.CST_CNT,C.CST_SUM,C.FRZ_AMT,BLC_AMT=convert(numeric(12,2),C.BLC_AMT/10),BLC_SUM=convert(numeric(12,2
3、),C.BLC_SUM/10),C.POT_CNT,C.POT_SUM,A.RVERfromBAS.VIPAleftjoinBAS_VIPBLCConA.VIPID=C.VIPID?--盤點單據(jù)審核不過去:selectIS_VALIDfromDOC_PD_BFwhereDOCNO-221404031355430002’updateDOC_PD_BFsetIS_VAL1D=1whereDOCNO-221404031355430002’?會員卡處理終端查詢:select*fromBAS.VIPPOINT?審核庫存成本調(diào)整:select*fromdoc_pt_bfw
4、heredocno=031508221035221001selectIS_VALIDFROMDOC_PT_BFwheredocno=031508221035221001UPDATEDOC_PT_BFSETIS_VALID=1wheredocno=*031508221035221001'?-連鎖傳輸不下去select*fromdbo.SYS_VERupdatedbo.SYS_VERsetVALUE二‘0’whereNAMElike&1003’修改商品配送屬性:?修改全部商品配送屬性:updateBAS_PLU_MAINsetPSTYPE二3?按照供貨商修改商品配
5、送屬性:select*fromBAS_PLU_MAINwherec.comnoupdateBAS_PLU_MAINsetPSTYPE=11updateAsetPSTYPE=4fromBAS_PLU_MAINAinnerjoinVIW_COM_PLUBonA.PLUID=B.PLUIDinnerjoinBAS_COMPANYConB.COMID=C.COMIDwhereC.COMID-60001’?按照商品積分條件修改商品配送屬性:select*fromBAS_PLU_MAINwhereVIPRAT=-10updateBAS_PLU_MAINsetPSTYPE=
6、3whereviprat=-10-每條語句單獨執(zhí)行,每句就是-條查詢、一條刪除前臺系統(tǒng)初始化,后臺刪除流水后執(zhí)行(刪除POS高級杳詢)?清空流水:TRUNCATETRUNCATETRUNCATETRUNCATETRUNCATETABLETABLETABLETABLETABLEPOS_ADV_PAYPOS_ADV_PLUPOS_ADV_TIMPOS_ADV_PAY_COMPOS_ADV_PAY_PAYNO?刪除流水:deletefromPOS_ADV_PAY_COMwhereDAT<2014-05-0100:00*ANDDAT<*2014-05-0100:00'
7、?刪除POS供應商付款方式高級查詢deletefromPOS_ADV_PAY_PAYNOwhereDAT<*2015-09-1800:004select*fromPOS_ADV_PAYselect*fromPOS_ADV_PLUselect*fromPOS_ADV_TIMTRUNCATETABLEPOS_ADV_PAY_COMTRUNCATETABLEPOS_ADV_PAY_PAYNO-清除而查詢看看(刪除會員及儲值卡消費記錄),不要執(zhí)行-TRUNCATE-TRUNCATE-TRUNCATE-TRUNCATE-TRUNCATETABLEdbo.BAS_VIPT
8、ABLEdbo.BAS_VIPBLCT