I have a table containing rows with parent/child relationships, like this:
I want to make a copy of this data and preserve the relationships in the copy (so that the duplicated Quad bike page's parent_id would reflect the new id assigned to the duplicated Products page). I'm using SQL Server 2005. Is there a quick way of doing this? There are about 2500 rows of data which I'd rather not have to sort through manuallyCode:id title parent_id 1 Home NULL 2 Products NULL 3 Scooter 2 4 Tricycle 2 5 About us NULL 6 Services NULL 12 Quad bike 2 20 FAQs 5
Any input would be much appreciated.










Bookmarks