IC卡加油站管理系統刪除表維護記錄
廣告:
select where DAY(dat) % 2=0
imgcenter庫:
select top 200 * from OilTrade order by PC_TIME desc
delete from OilTrade where pc_time<'2025-01-01'
delete from OperateLog where opttime<'2025-01-01'
UserDepositTrade 需要更新日期
MakeCardLog 需要更新日期
UserCardInfo 需要更新日期
SaleCardLog 需要更新日期
oil 庫:
ic_new_trade flow_no
trade_ascii flow_no trade_ascii
trade flow_no (int)
select top 200 * from trade order by PC_TIME desc
--and DAY(pc_time) % 2!=0
delete from trade where pc_time <'2025-01-01'
delete from trade_ascii where flow_no not in (select flow_no from trade)
delete from ic_new_trade where flow_no not in (select flow_no from trade)
delete from rpt_tank where buss_date<'2025-01-01'
delete from rpt_oil where buss_date<'2025-01-01'
delete from rpt_mach where buss_date<'2025-01-01'
delete from rpt_opermoney where buss_date<'2025-01-01'
delete from rpt_operqty where buss_date<'2025-01-01'
delete from oper_comp where buss_date<'2025-01-01'
delete from [shift] where buss_date<'2025-01-01'
delete from trade_oper where buss_date<'2025-01-01'
delete from day_rpt_mach where rptday<'2025-01-01'
delete from day_rpt_tank where rptday<'2025-01-01'
delete from Day_Rpt_Tank_New where rptday<'2025-01-01'
delete from day_rpt_oil where rptday<'2025-01-01'
delete from day_opermoney where rptday<'2025-01-01'
delete from dayrpt where rptday<'2025-01-01'
delete from day_operqty where rptday<'2025-01-01'
EmpDeposit 此表不能確定 (需要還原)
delete from EmpDeposit where DepositDateTime<'2025-01-01'
trade_grey 需要更新日期
Rpt_EmpCard 加油卡記錄 此表不能確定
delete from Rpt_EmpCard where buss_date<'2025-01-01'
存入本班加油交易表中 trade_shift (當天)
ic_white_card 需要更新日期
EmpDeposit 會員注冊日期 需要更新日期
ic_sale_card 會員記錄有過去的日期
Card_EmpBalance 充值
注意日期要為:2025-01-01 不能為 2025-1-1
更新總統計數:
查詢總數
select top 200 * from trade order by mach_time
更新05槍號總統計數
select top 200 * from trade where terminal='05_1' order by mach_time
update trade set pump_qty=pump_qty-(881171.44-11.300) where terminal='05_1'
刪除某槍號資料 5 6 9
delete from trade where terminal='09_1' or terminal='06_1' or terminal='05_1'
delete from trade_ascii where flow_no not in (select flow_no from trade)
delete from ic_new_trade where flow_no not in (select flow_no from trade)
delete from rpt_mach where terminal='09_1' or terminal='06_1' or terminal='05_1'
delete from day_rpt_mach where terminal='05_1' or terminal='06_1' or terminal='09_1'
Day_Rpt_Tank_New ?
day_rpt_tank ?
rpt_tank ?
廣告: