October 3, 2011 at 9:09 am
Hello,
I want when any record insert in to any child table who have a foreign key of parent , must change the update date in parent table . Any idea how to do it?
October 3, 2011 at 9:21 am
Please don't double post. See my other response on cascading inserts.
October 3, 2011 at 9:54 am
This really is not the same as his other question. http://www.sqlservercentral.com/Forums/Topic1184615-391-1.aspx
In this case he wants to update the parent record when a child is inserted.
To accomplish just create an insert trigger on your child table. Then you simply do an update to the parent record(s).
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 3, 2011 at 11:06 am
Thanks let me try it. definite you are right...
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply