Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
scottichrosaviakosmos
Yak Posting Veteran
66 Posts |
Posted - 2012-08-05 : 05:03:44
|
Childid Childname Parentid pid100 Bingo 200 1101 Pingo 201 1102 Zingo 201 1100 Bingo 201 2101 Pingo 200 2102 Zingo 201 2100 Bingo 201 3101 Pingo 201 3102 Zingo 200 3100 Bingo 200 4101 Pingo 201 4102 Zingo 200 4 As we can see in this table that ‘100’ has multiple parents for different Pids.100=200 and 100=201 , So I want to creating a query that will check in previous id whether childid is mapped with new parentid . if parent has changed then create a new childid with same childname.What about doing same thing in a historical table where the parent of 100 has changed many times.How to get a data where we can find when all the parent of child has changed from all past Pid’s.scoo |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-05 : 14:59:19
|
so you want it to be done each time on insertion of new record?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|