February 3, 2010 at 21:03
filed under Dynamics AX
Tagged Dynamics AX, SQL
This week, we were shrinking a database of a development environment by deleting some companies.
Here a nice little SQL statement that uses the sp_MSforeachtable stored procedure to delete all records of a specific company (CEU in this case) from all tables.
Certainly fast(er than AX) and gets the job done.
Use at your own risk
Update:
You’ll want do do some cleaning up to:
delete the company id from the DataArea table and from the CompanyDomainList table
no comments
RSS / trackback