Trouble deleting Taxonomy
Last Post 01/29/2015 9:39 AM by Joseph Craig. 2 Replies.
Author Messages
Amanda Thomas
Nuke Pro
Nuke Pro
Posts:73


--
01/22/2015 10:23 AM  
I am trying to delete one of my custom hierarchical Taxonomy vocabularies and all the terms it contains.

Nothing happens when I click Delete going through the DNN web admin interface.

I also tried to delete it using SQL:

delete from Taxonomy_Vocabularies
where VocabularyID = 8

delete from Taxonomy_Terms
where VocabularyID = 8

but get this error (on both queries):


Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "FK_Taxonomy_Terms_Taxonomy_Terms". The conflict occurred in database "DNN7", table "dbo.Taxonomy_Terms", column 'ParentTermID'.
The statement has been terminated.


I tried making a test Taxonomy and was able to delete it just fine, using website or SQL.

Several months ago, I had added & made changes to a lot of these terms using SQL because it was faster to change lots of items at once, but apparently I screwed something up. Now I want to delete them all and start over from scratch (and staying out of SSMS).

(Tried putting my code in code tags, but it wasn't working right. Sorry.)
Amanda Thomas
Nuke Pro
Nuke Pro
Posts:73


--
01/28/2015 10:08 AM  
For anyone else who stumbles across this post and has a similar problem, here is the solution:
http://www.dnnsoftware.com/forums/f...cope/posts


Didn't have much luck with the exact SQL they gave me, but now I know to delete all the children, then parents, then grandparents, and so forth.
Joseph Craig
DNN MVP
Posts:11667


--
01/29/2015 9:39 AM  
Thanks!

Joe Craig, Patapsco Research Group
Complete DNN Support


---