Can anyone suggest a query to move a large number of Drupal nodes from one term in a taxonomy to another term in the same taxonomy?
I've tried the "Taxonomy Multi Edit," "Taxonomy Manager" and "Taxonomy Switch" modules, but none seem to be able to do this. The closest was "Taxonomy Multi Edit," however it would not allow me to filter only certain nodes, only showing all nodes on the site.
I can select the nodes I need to change with a query like:
SELECT *
FROM term_node tn
INNER JOIN node n ON tn.nid = n.nid
AND n.title LIKE 'India%'but if I try to change the term with an update statement like:
update term_node tn
INNER JOIN node n ON tn.nid = n.nid
set tn.tid = 1721
where n.title LIKE 'India%'I get a duplicate key error: "#1062 - Duplicate entry '1721-2140' for key 1".
We have over 1000 nodes that are in the wrong taxonomy term and I think there has to be some way to move them to the correct term without editing each and every node individually.
--
Thanks,
Glenn Gillis
Information Technology Manager
Environmental Law Alliance Worldwide
U.S. Office
http://www.elaw.org