Table Data delete

navuser1
Member Posts: 1,334
I want to delete data from transaction tables through
SQL commands.Which command will be more help full, "Trancate" Or
"Delete"???
Suggest me
SQL commands.Which command will be more help full, "Trancate" Or
"Delete"???
Suggest me
Now or Never
0
Comments
-
navuser1 wrote:I want to delete data from transaction tables through
SQL commands.Which command will be more help full, "Trancate" Or
"Delete"???
Suggest me
Try the little [X] on the top right of SQL Management Studio.
Then go to Control Panel and Uninstall SSMS from your computer.
Basically if you are thinking of doing this, then you really should not be allowed to have access to SQL.
](*,)David Singleton1 -
If you're unclear of the difference between "DELETE FROM TABLE" and "TRUNCATE TABLE", you should not even be considering touching the Navision database directly from SQL.There are no bugs - only undocumented features.0
-
Navuser, really, start by learning what these commands are doing and learn all the things about NAV on SQL (mainly that it is very dangerous to touch the data outside NAV) and after that if something is not clear, we can help you.0
-
kine wrote:Navuser, really, start by learning what these commands are doing and learn all the things about NAV on SQL (mainly that it is very dangerous to touch the data outside NAV) and after that if something is not clear, we can help you.
Now I understand what you were telling me at lunch the other day. And you you were 100% right.David Singleton0 -
Very interesting.
Why not try both & let us know the results?NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
navuser1, please. Before posting some questions like this:
Read the f****** manuals.
The difference between the delete statement and the truncate statement is that one of this log the transaction. but you will wonder whats happens when delete datas from tables (sql) that have Sift Tables. I hope you know what this is.
The best way: format your HDD and shutdown the server ;-)
Than all transactions are deletet \:D/Do you make it right, it works too!0 -
garak wrote:navuser1, please. Before posting some questions like this:
Read the f****** manuals.
The difference between the delete statement and the truncate statement is that one of this log the transaction. but you will wonder whats happens when delete datas from tables (sql) that have Sift Tables. I hope you know what this is.
The best way: format your HDD and shutdown the server ;-)
Than all transactions are deletet \:D/
Actually, they both log the activity. Just at different levels of detail.There are no bugs - only undocumented features.0 -
Delete transaction data directly from SQL is a very dangerous act. You have to study and understand the table relationship very clearly before delete the data so that you won't corrupt the data integrity.
If only want to delete the data in the tables added by you which you are very sure on the table design, then it should be safer. If you want to delete transaction data in NAV standard transaction table, be careful. [-o<
I hope you are clear on what you are trying to do and how serious is it after reading so many replies in this topic.0 -
ok, what i mean is following.
if u use truncate, the transactions (delete) can not be recovered with RollBack, because the transactions runs implicit. And the auto_incr. option will be set at the first option. There are typically fewer locks.
But TRUNCATE TABLE con not handle Foreign Keys, participate in an indexed view and is used by transactional replication or merge replication (system intern) nad TRUNCATE TABLE cannot activate a trigger because the oper. doesn't individ. row deletions, and my last knowledge, you can not use the where clausel.
RegardsDo you make it right, it works too!0 -
garak wrote:ok, what i mean is following.
if u use truncate, the transactions (delete) can not be recovered with RollBack, because the transactions runs implicit. And the auto_incr. option will be set at the first option. There are typically fewer locks.
But TRUNCATE TABLE con not handle Foreign Keys, participate in an indexed view and is used by transactional replication or merge replication (system intern) nad TRUNCATE TABLE cannot activate a trigger because the oper. doesn't individ. row deletions, and my last knowledge, you can not use the where clausel.
Regards
I agree with everything you're saying except that a TRUNCATE cannot be rolled back.There are no bugs - only undocumented features.0 -
[Topic moved from Navision forum to SQL General forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
David Singleton wrote:navuser1 wrote:I want to delete data from transaction tables through
SQL commands.Which command will be more help full, "Trancate" Or
"Delete"???
Suggest me
Try the little [X] on the top right of SQL Management Studio.
Then go to Control Panel and Uninstall SSMS from your computer.
Basically if you are thinking of doing this, then you really should not be allowed to have access to SQL.
](*,)I haven't stoped laughing at this all evening... "Pure Genius" post =D>
0 -
DaveT wrote:...
I haven't stoped laughing at this all evening... "Pure Genius" post =D>
If I was a door in the Heart Of Gold, I would say "Glad To Be Of Service".David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions