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 |
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2013-02-22 : 20:41:25
|
GreetingsEver come across this? I created a default constraint on ModifyDate and ModifyByWhen doing an update on a row the values of these column do not change. They are both nullable columns, it is something I have inherited and am unable to change the embedded oogly code on the site. Not sure why the constraint are not doind what I was hoping to do when site calls UPDATE table set x = 0Thanks<><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-02-22 : 20:48:13
|
default constraint only take effect on INSERT statement. Not UPDATE KH[spoiler]Time is always against us[/spoiler] |
|
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2013-02-22 : 20:51:17
|
are you serious!!!!!!?!? u learn something new all the time.THanks Khtan!<><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-02-22 : 21:02:05
|
http://msdn.microsoft.com/en-us/library/aa175912%28v=sql.80%29.aspxif you want to handle the UPDATE, you need to use update trigger KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|