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 |
smisich
Starting Member
5 Posts |
Posted - 2012-03-25 : 21:46:14
|
I have this problem,we set rates as followseffective date expiry date rate1/1/2011 1/3/2011 0.102/3/2011 31/12/2099 0.20then the user can amend the rates as follows2/3/2011 10/10/2011 0.2011/10/2011 31/12/2011 0.30011/01/2012 31/12/2099 0.40I need to identify the change that the user makes.eg the query should returnEff Date Exp Date Before After11/10/2011 31/12/2011 0.20 0.30 11/10/2011 31/12/2011 0.20 0.40 Can an anyone help me with this query? |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
smisich
Starting Member
5 Posts |
Posted - 2012-03-26 : 22:31:44
|
thanks for your reply but im not looking to add any triggers. I need a script. |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-03-26 : 22:53:51
|
so you have the before / after information stored somewhere ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2012-03-27 : 01:19:50
|
How are you capturing the changes in the backend, a sproc, .net app or what. What you can do is 1. Save current values to a table variable and or temp table2. After the insert capture the values that were inserted into an OUTPUT variable3. dump the values from stept 1 and step 2 into your audit table<><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
|
|
|