Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

copy parent records with child records Expand / Collapse
Author
Message
Posted Thursday, July 23, 2009 5:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, November 22, 2011 4:48 AM
Points: 2, Visits: 11
Hello below is my table structure

Master Table
ID Name
--------
1 record1
2 record2
3 record3

first child

ID Name MasterID
-----------------
1 asdasd 1 (fk master)
2
3
4


child of first child

ID Name MasterID
-----------------
1 asdasd 1(FK first child)


all i want to do is when i provide an id of the master record, and a new name for that, it must copy and create a new record of that master data. and then all child elements related to old master needs to be copied in the same tables for the new master id.

any suggestions on this ?
Post #758115
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse