# How to delete a record in tt temp table **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2017-01-26 16:03 UTC **Views:** 1728 **Replies:** 4 **URL:** https://www.epiusers.help/t/how-to-delete-a-record-in-tt-temp-table/37031 --- ## Post #1 by @yzou555 Is it possible to delete a record in tt table in "In-Transaction" Data Directive so the record will not be saved to the database. Let's day I want to delete a record in ttOrderDtl record if ttOrderDtl.Discount > 30%. If yes, could you please share couple lines of sample code Thanks! --- ## Post #2 by @aidacra You would want to raise an exception message instead which will stop the transaction. Basic logic: if ttorderdtl.discount > 30% then raise exception with message "discount greater than 30% is not allowedl" --- ## Post #3 by @yzou555 Thanks, Nathan. The case I gave here is just as an example. Raising exception is what I normally do. I do want to know if deleting tt table record is possible in Data Directive so the record will not land in the database. --- ## Post #4 by @aidacra What is the use case where you wouldn't wish to use an exception but you wish to try to delete the ttOrderDtl record? --- ## Post #5 by @yzou555 I just use ttOrderDtl as an example of tt temp table. I don't know the whole story, but was tasked to find out if this is possible. Thanks, Nathan! --- **Canonical:** https://www.epiusers.help/t/how-to-delete-a-record-in-tt-temp-table/37031 **Original content:** https://www.epiusers.help/t/how-to-delete-a-record-in-tt-temp-table/37031