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 |
newbietosql1221
Starting Member
25 Posts |
Posted - 2010-10-05 : 09:48:52
|
I need to find a way to see if a field has been updated by current month? For example a field called allocated has been updated at all by current month of october if NO then print 0 if yes print what was changed |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2010-10-05 : 10:02:03
|
Unless you audit changes by some means or minimally maintain a [LastModified] column then you can't tell when a specific column was last changed.Be One with the OptimizerTG |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-10-05 : 10:02:07
|
You need to use a update tiggerMadhivananFailing to plan is Planning to fail |
 |
|
newbietosql1221
Starting Member
25 Posts |
Posted - 2010-10-05 : 10:33:37
|
thanks tg and mad, but i dont even know where to begain with a trigger... can you helpmy_date Allocated------- ----------10/01/2010 12:33:06 100 10/01/2010 12:50:11 20009/29/2010 13:44:02 3408/20/2010 22:13:46 5so as long as the current month have value change to that valueif not leave a zero under this month allocated |
 |
|
|
|
|