Ladies and Gents,
Due to some wrong functional setup and programming, one of our clients now has a table with 2bln lines which takes upto 2tb of storage. The table data is not being used anywhere anymore.....;)
I have been trying to delete these through processing reports and codeunits, with deleteall. This does not work (ie takes too long and/or sql error).
Online I have seen someone mention following:
"Object.SETRANGE(Type,Object.Type::TableData);
Object.SETRANGE("Company Name",COMPANYNAME);
Object.SETRANGE(ID,DATABASE::"Customer Price Group"); // This is the table to flush
Object.DELETEALL;"
Would appreciate your opinion or a proposed solution.
Thanks in advance.
0
Answers
RIS Plus, LLC
Just ensure that database is on single user for it to be faster.
Thank you very much! Truncate Table from Server Management Studio worked like a charm. All data GONE within a second.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/