大哥们小弟求救了!关于写sql语句如何不记日志的问题.
delect在执行删除工作时会产生大量的日志,以致于最后不能运行!!怎么样写一个语句在执行字时不生成日志!!或者生成很少的日志!
我当时写的脚本为:
use cityone_accountv3
go
begin transaction
Declare @tempdate char(
Select @tempdate=convert(char( ,getdate()-75,112)
INSERT INTO dc_phonedaytotalback(mt_YMD,mt_TelNo,mt_AreaInTime,mt_AreaInCount,mt_AreaInBillCount,mt_AreaInCharge,mt_AreaInF4Charge,mt_AreaOuttime,mt_AreaOutCount,mt_AreaOutBillCount,mt_AreaOutCharge,mt_AreaOutF4Charge,mt_SNTime,mt_SNBillCount,mt_SNFee,mt_SNF4Fee,mt_SWTime,mt_SWBillCount,mt_SWCount,mt_SWFee,mt_SWF4Fee,mt_GJTime,mt_GJCount,mt_GJBillCount,mt_GJFee,mt_GJF4Fee,mt_GOTtime,mt_GOTCount,mt_GOTBillCount,mt_GOTFee,mt_GOTF4Fee,mt_IPTime,mt_IPCount,mt_IPBillCount,mt_IPFee,mt_IPF4Fee,mt_CalledTime,mt_CalledCount,mt_CalledBillCount,mt_CalledFee,mt_OtherFee)
SELECT mt_YMD,mt_TelNo,mt_AreaInTime,mt_AreaInCount,mt_AreaInBillCount,mt_AreaInCharge,mt_AreaInF4Charge,mt_AreaOuttime,mt_AreaOutCount,mt_AreaOutBillCount,mt_AreaOutCharge,mt_AreaOutF4Charge,mt_SNTime,mt_SNBillCount,mt_SNFee,mt_SNF4Fee,mt_SWTime,mt_SWBillCount,mt_SWCount,mt_SWFee,mt_SWF4Fee,mt_GJTime,mt_GJCount,mt_GJBillCount,mt_GJFee,mt_GJF4Fee,mt_GOTtime,mt_GOTCount,mt_GOTBillCount,mt_GOTFee,mt_GOTF4Fee,mt_IPTime,mt_IPCount,mt_IPBillCount,mt_IPFee,mt_IPF4Fee,mt_CalledTime,mt_CalledCount,mt_CalledBillCount,mt_CalledFee,mt_OtherFee
FROM dc_phonedaytotal
where convert(char( ,mt_YMD,112)<@tempdate
DELETE
FROM dc_phonedaytotal
where convert(char( ,mt_ymd,112)<@tempdate
return |