--µ¥¾Ý
|
truncate table QMSaleCkRequest
|
truncate table QMSaleCkRequestEntry
|
truncate table QMINQCReq
|
truncate table QMINQCReqEntry
|
truncate table ICQCBill
|
truncate table QMSourceInfo
|
truncate table PPOrder
|
truncate table PPOrderEntry
|
truncate table ICExpenses
|
truncate table ICExpensesEntry
|
truncate table ICInvBackup
|
truncate table ICQCScheme
|
truncate table ICQCSchemeEntry
|
--¹Ì¶¨×ʲú
|
truncate table T_FACard
|
truncate table T_FACardItem
|
truncate table T_FADevice
|
truncate table T_FAOrgFor
|
truncate table T_FADept
|
truncate table T_FAExpense
|
truncate table t_FAPurchase
|
truncate table T_FAbalCard
|
truncate table T_FAbalCardItem
|
truncate table T_FAbalDevice
|
truncate table T_FAbalOrgFor
|
truncate table T_FAbalDept
|
truncate table T_FAbalExpense
|
truncate table t_FAbalPurchase
|
truncate table t_FAVoucher
|
truncate table t_FAClear
|
DELETE FROM T_FAAlter
|
DELETE FROM t_FAbalance
|
truncate table t_RP_NewReceiveBill
|
truncate table t_RP_Contact
|
truncate table t_rp_ARBillOfSH
|
truncate table t_rp_AdjustAccount
|
truncate table t_rp_AdjustRate
|
truncate table t_rp_AdjustRateEntry
|
truncate table t_rp_ARBillOfSH
|
truncate table t_RP_ARPBill
|
truncate table t_rp_arpbillEntry
|
truncate table t_rp_BegData
|
truncate table t_rp_BegDataEntry
|
truncate table t_RP_Bill
|
truncate table t_rp_bill_discount
|
truncate table t_RP_Bill_Endorse
|
truncate table t_RP_Bill_Settle
|
truncate table t_Rp_CheckDetail
|
truncate table t_rp_CheckDetail20120517134445300
|
truncate table t_rp_CheckEntry
|
truncate table t_RP_Contact
|
truncate table t_RP_ContactBal
|
truncate table t_rp_ContractPlanReceive
|
truncate table t_RP_NewReceiveBill
|
truncate table t_rp_PayApplyBill
|
truncate table t_rp_PayApplyBillEntry
|
truncate table t_RP_Plan_Ap
|
truncate table t_RP_Plan_Ar
|
truncate table t_RPContract
|
truncate table t_rpContractEntry
|
truncate table t_RPContractScheme
|
truncate table t_RPVoucherAndBill
|
truncate table t_RP_NewCheckInfo
|
DELETE FROM t_Item_3003
|
DELETE FROM t_Item_3004
|
DELETE FROM t_Item_3005
|
DELETE FROM t_Item_3006
|
DELETE FROM t_Item_3009
|
truncate table ICStockBill
|
truncate table ICPlanAdjPrice
|
truncate table POrequest
|
truncate table POOrder
|
truncate table POInstock
|
truncate table POInstock
|
truncate table ICPurchase
|
truncate table ICSale
|
truncate table SEOrder
|
truncate table SEOutStock
|
truncate table PORFQ
|
truncate table ICMO
|
truncate table ICSale
|
truncate table t_Voucher
|
truncate table t_Voucherentry
|
truncate table ICStockBill
|
truncate table ICStockBillEntry
|
truncate table ICPlanAdjPriEntry
|
truncate table POrequestEntry
|
truncate table POOrderEntry
|
truncate table POInstockEntry
|
truncate table ICPurchaseEntry
|
truncate table ICSaleEntry
|
truncate table SEOrderEntry
|
truncate table SEOutStockEntry
|
truncate table PORFQEntry
|
truncate table ppbom
|
truncate table ICSTJGBill
|
truncate table ICSTJGBillEntry
|
truncate table POInventory
|
truncate table ICChange
|
truncate table ICChangeEntry
|
truncate table ICMOChange
|
truncate table ICMOChangeEntry
|
truncate table PPBomChange
|
truncate table PPBomChangeEntry
|
truncate table PPBOMEntry
|
truncate table ICitemScrap
|
truncate table ICitemScrapEntry
|
truncate table ICMORpt
|
truncate table ICMORptEntry
|
truncate table QMReject
|
truncate table QMRejectEntry
|
truncate table ICMOConvertBill
|
truncate table ICMOConvertBillEntry
|
truncate table icinventory
|
truncate table icbal
|
truncate table icinvbal
|
truncate table ICInvInitial
|
truncate table ICShop_ItemConsumeEntry
|
truncate table CBStdStdPrice
|
truncate table ICQCBillEntry
|
truncate table cbMaterielInfo_History
|
truncate table ICMnbomChild
|
truncate table POInvBal
|
truncate table ICClassCheckRecords1001000
|
truncate table icstockbillentry2019011501
|
truncate table icstockbillentry20181120
|
truncate table ICQuotePriceMtrl
|
truncate table CRM_SVTrace
|
truncate table t_msgList
|
truncate table cbCalinfoDetail
|
truncate table ICBOMChild
|
truncate table ICPrintCountEntry
|
truncate table ICClassCheckStatus1001000
|
truncate table ICPrintCount
|
truncate table t_CashFlowBal
|
truncate table ICMrpResult
|
truncate table t_MakeVouchTemp
|
truncate table t_BaseProperty
|
truncate table ICClassMCRecord1000040
|
truncate table ICClassMCStatus1000040
|
truncate table t_ProfitAndLoss
|
truncate table t_ICItemCore
|
truncate table t_ICItemPlan
|
truncate table t_ICItemQuality
|
truncate table t_ICItemCustom
|
truncate table t_ICItemMaterial
|
truncate table t_ICItemBase
|
truncate table t_ICItemDesign
|
truncate table t_ICItemStandard
|
truncate table t_LowestBomCode
|
truncate table CRM_SVAssign
|
truncate table CRM_ServiceRequest
|
truncate table CRM_Satisfaction
|
truncate table CRM_SVProcess
|
truncate table cbCostObjDetail
|
truncate table ICVouchBillTranType
|
truncate table ICClassCheckRecords1001001
|
truncate table t_SupplyEntry
|
truncate table t_Supply
|
truncate table cbExpenseDistributeInfo_History
|
truncate table ICShop_ItemConsume
|
truncate table ICClassTableInfo_bak20080418194131
|
truncate table seorderentry20190624
|
truncate table seorderentry20190516
|
truncate table SEOutStockEntry20190624
|
truncate table ICClassCheckStatus1001001
|
truncate table CRM_Fittings
|
truncate table cbProductCalInfo
|
truncate table cbCalInfo
|
truncate table CRM_Contact
|
truncate table t_ItemDetailV
|
truncate table t_ItemDetail
|
truncate table ICMrpInfo
|
truncate table t_Balance
|
delete icstockcheckprocess
|
delete icinvbackup
|
DELETE FROM t_Item WHERE FItemID >=135
|
DELETE FROM t_Base_Emp WHERE FItemID >0
|
truncate table cb_CostObj_Product
|
truncate table cb_ICStockBill
|
truncate table cb_ICStockBillEntry
|
truncate table cbBalance
|
truncate table CBCalInfo_CurData
|
truncate table CBCalInfoDetail_CurData
|
truncate table cbCompleteQty
|
DELETE cbCostObj WHERE FItemID NOT IN (55,56)
|
truncate table CBCostObjAdjustDetailbak
|
truncate table cbExpenseDistributeInfo
|
truncate table cbInQty
|
truncate table cbMaterielInfo
|
truncate table cbProductQty
|
truncate table cn_Bill
|
truncate table ICbal_sean2
|
truncate table ICBOM
|
truncate table ICClientVer
|
truncate table ICPlan_PMCDetail
|
truncate table ICPlanOrderRel
|
DELETE FROM t_Account
|
truncate table t_Department
|
truncate table t_dev_AZ
|
truncate table t_dev_AZEntry2
|
truncate table t_dev_AZSQ
|
truncate table t_dev_AZSQEntry2
|
truncate table t_dev_AZZF
|
truncate table t_dev_AZZFEntry2
|
truncate table t_dev_freight
|
truncate table t_dev_freightEntry2
|
truncate table t_dev_TC
|
truncate table t_dev_TCEntry2
|
truncate table t_dev_TCPay
|
truncate table t_dev_TCPayEntry2
|
truncate table t_dev_ZX
|
truncate table t_dev_ZXEntry2
|
truncate table t_dev_ZXSQ
|
truncate table t_dev_ZXSQEntry2
|
truncate table t_dev_ZXZF
|
truncate table t_dev_ZXZFEntry2
|
truncate table t_LockStock
|
truncate table t_Organization
|
truncate table t_Stock
|
truncate table t_Supplier
|
DELETE FROM ICHookRelations
|
DELETE FROM cbWMaterielInfo
|
DELETE FROM cbWCalinfoDetail
|
DELETE FROM cbCostObjCheck
|
DELETE FROM ICQuotePrice
|
DELETE FROM cbWasterCostObjInfo
|
DELETE FROM cbCostVoucher
|
DELETE FROM CBCostExpenseInfo
|
DELETE FROM ICSubContract
|
DELETE FROM dbo.ICSubContractEntry
|
DELETE FROM ICSerialFlow
|
--ÉèÖà ÆôÓÃÆÚ¼ä£¬µ±Ç°ÆÚ¼ä,ÕâÀXÔ·ݿªÊ¼ÓþÍÉèÖÃΪ¼¸Ô·Ý
|
update t_SystemProfile set FValue=9 where FCategory='gl' and FKey='startperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='gl' and FKey='startyear'
|
update t_SystemProfile set FValue=9 where FCategory='ic' and FKey='startperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='ic' and FKey='startyear'
|
update t_SystemProfile set FValue=9 where FCategory='CB' and FKey='startperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='CB' and FKey='startyear'
|
update t_SystemProfile set FValue=9 where FCategory='FA' and FKey='startperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='FA' and FKey='startyear'
|
update t_SystemProfile set FValue=9 where FCategory='gl' and FKey='currentperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='gl' and FKey='currentyear'
|
update t_SystemProfile set FValue=9 where FCategory='ic' and FKey='currentperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='ic' and FKey='currentyear'
|
update t_SystemProfile set FValue=9 where FCategory='CB' and FKey='currentperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='CB' and FKey='currentyear'
|
update t_SystemProfile set FValue=9 where FCategory='FA' and FKey='currentperiod'
|
update t_SystemProfile set FValue=2020 where FCategory='FA' and FKey='currentyear'
|
UPDATE dbo.t_RP_SystemProfile set FValue=9 WHERE FKey ='FAPCurPeriod'
|
UPDATE dbo.t_RP_SystemProfile set FValue=2020 WHERE FKey ='FAPCurYear'
|
UPDATE dbo.t_RP_SystemProfile set FValue=9 WHERE FKey ='FAPUsePeriod'
|
UPDATE dbo.t_RP_SystemProfile set FValue=2020 WHERE FKey ='FAPUseYear'
|
UPDATE dbo.t_RP_SystemProfile set FValue=9 WHERE FKey ='FARCurPeriod'
|
UPDATE dbo.t_RP_SystemProfile set FValue=2020 WHERE FKey ='FARCurYear'
|
UPDATE dbo.t_RP_SystemProfile set FValue=9 WHERE FKey ='FARUsePeriod'
|
UPDATE dbo.t_RP_SystemProfile set FValue=2020 WHERE FKey ='FARUseYear'
|
--ÖØ½¨Ë÷Òý
|
DECLARE @DBCCString NVARCHAR(1000)
|
DECLARE @TableName VARCHAR(100)
|
DECLARE Cur_Index CURSOR FOR
|
SELECT Name AS TblName FROM sysobjects WHERE xType='U' ORDER BY TblName FOR READ ONLY
|
OPEN Cur_Index
|
FETCH NEXT FROM Cur_Index INTO @TableName
|
|
WHILE @@FETCH_STATUS=0
|
BEGIN
|
PRINT 'ÖØ½¨±í' + @TableName +'µÄË÷Òý........Start!'
|
SET @DBCCString = 'DBCC DBREINDEX(@TblName,'''')WITH NO_INFOMSGS'
|
EXEC SP_EXECUTESQL @DBCCString, N'@TblName VARCHAR(100)', @TableName
|
PRINT 'ÖØ½¨±í' + @TableName +'µÄË÷Òý........END!'
|
FETCH NEXT FROM Cur_Index INTO @TableName
|
END
|
CLOSE Cur_Index
|
DEALLOCATE Cur_Index
|
PRINT '²Ù×÷Íê³É£¡'
|
--ÊÕËõÊý¾Ý¿â
|
DELETE FROM t_SuspendWorkPushMain
|
DELETE FROM t_SuspendWorkPushDetail
|
DELETE FROM ICClassMCTaskCenter
|