Deleting all data in the Database
Interprise Suite Community
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Deleting all data in the Database Expand / Collapse
Message
Posted 8/14/2009 1:35:21 PM Post #242
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Hi,

I was just wondering if anyone had the proper SQL code to wipe all data out of the database?

After doing a recent import of products I now need to wipe all data...everything from the database.

Any help would be greatly appreciated.

Christian

Posted 8/31/2009 1:22:57 PM Post #256
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I had a need to clear our database of all the data except the customer records that we had accumulated. This is the script I used. I don't claim anything about this to be safe. USE AT YOUR OWN RISK. But at least maybe it will get you started.


Update AccountingCOA Set CurrentBalanceAmount = 0

Delete From AccountingDailyBalance

Delete From AccountingJournalDetail

Delete From AccountingJournal

Delete From AccountingJournalAccountHistory

Delete From AuditTrail

Delete From BankDailyAnalysis

Update BankingAccount Set Balance = 0

Delete From BankingDeposit

Delete From BankingDepositDetail

Delete From BankingWriteCheck

Delete From BankingWriteCheckDetail

Delete From BankMonthlyAnalysis

Delete From CacheTablesDeleteLog

--Delete From Customer
--Delete From CustomerAccount

Delete From CustomerAllocation

Delete From CustomerAllocationCredit

Delete From CustomerAllocationDebit

Delete From CustomerCardPayment

Delete From CustomerCCAuthResponse

Delete From CustomerCredit

Delete From CustomerDailyAnalysis

Delete From CustomerInvoice

Delete From CustomerInvoiceDetail

Delete From CustomerItems

Delete From CustomerMonthlyAnalysis

--Delete From CustomerPayment

Delete From CustomerPaymentDetail

Delete From CustomerSalesOrder

Delete From CustomerSalesOrderDetail

Delete From CustomerSalesOrderWorkflow

Delete From CustomerSalesRepCommission

Delete From CustomerSalesRepCommissionBatch

Delete From CustomerSalesRepCommissionBatchDetail

Delete From CustomerSalesRepCommissionBatchDetailInvoices

Delete From CustomerServiceContract

Delete From CustomerServiceContractDetail

Delete From CustomerTransactionReceipt

Delete From JournalReference

Delete From PaymentMethod

Delete From CustomerCreditCard

Delete From PostStatus

Delete From SupplierBill

Delete From SupplierBillDetail

Delete From SupplierDailyAnalysis

Delete From SupplierMonthlyAnalysis

Update SystemStartingNumber Set Number = 0
Update SystemStartingNumber Set Number = 100000 Where TableTransaction = 'Quote'
Update SystemStartingNumber Set Number = 500000 Where TableTransaction = 'SalesOrder'

Delete From TransactionItemSummaries

Delete From TransactionSummaries

Delete From TransactionItemTaxDetail

Delete From TransactionSummaries

Delete From TransactionTaxDetail

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Bill Dimes, John Grande, BJ Dimes, Terry Palmer

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 12:32am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.016. 12 queries. Compression Disabled.
Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for our Email Newsletter

Links to our Sponsors

DimeSoft Business Solutions Logo Interprise Suite Plugins Logo Logo Ad

Recent DimeSoft Blog Posts

Recent InfoSourcing Blog Posts

Recent Premier Blog Posts