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 |
|
Targe
Starting Member
3 Posts |
Posted - 2008-10-24 : 15:10:44
|
| I know there's a way to check if a column was changed but when a table of mine has over 100 columns in it, I'm thinking there must/should be a better way to know if the table was changed. Plus, I don't care which column was changed, so it does me little good. I just want to know if the table was changed. Anyone know of way? |
|
|
rohitkumar
Constraint Violating Yak Guru
472 Posts |
Posted - 2008-10-24 : 15:41:17
|
| when you say column was changed do you mean data type for a column was changed or the data in the column changed? |
 |
|
|
Targe
Starting Member
3 Posts |
Posted - 2008-10-24 : 15:58:22
|
| Data in the column. Basically my form can be saved at any point and I have a history table which inserts a row saying it was updated (with other stuff, too). The problem is, if it was not updated in the real world sense (even though in SQL it was), I do not want to write a new row to the history table. So how can I tell if the table was changed or it remained the same? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
rohitkumar
Constraint Violating Yak Guru
472 Posts |
Posted - 2008-10-24 : 16:13:08
|
| so you want to check if any of the 100 columns you have in the table has changed or not?you'll have to compare the fields your form is sending to the fields that are in the table. |
 |
|
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2008-10-24 : 16:19:09
|
| If you haven't been saving the last modified date to a table, you'll need to compare with previous backups... |
 |
|
|
Targe
Starting Member
3 Posts |
Posted - 2008-10-24 : 19:16:27
|
| The trigger looks like it will work, thank you! |
 |
|
|
|
|
|