Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
T-SQL Trigger/SQL Server 7.0
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
T-SQL Trigger/SQL Server 7.0
Miscellaneous
Thread ID:
00672425
Message ID:
00672425
Views:
37
This is really a multi-part question, so please bear with me. I’m posting this question on both the VFP and SQL Server forums in hopes of finding an answer.

I’ve been given the assignment to write a series of update triggers for some SQL Server 7.0 tables. Each table has a “date last modified” field. What the assignment entails is not updating that field if the record currently in the table is exactly the same other than this field. The source of the problem is twofold. First, if a user makes a change to a field, then changes the data back to the original, the modification date should not be changed. I realize that this is largely a UI problem, but since the updates are coming from a non-VFP application and one I’m not involved with, there’s nothing I can do on that side to make the problem easier. Second, these tables are regularly updated from a series of DB2 tables, which reside on the mainframe. In this case, all records are being updated.

So the first question is simply, is there an easier way, other than comparing all the other fields in the inserted table against the same fields in the same record in the deleted table? Further, is there any way to do it generically? IOW, without having to hard code the actual fields names into the trigger. If this simply involved one or two fields, it would be relatively easy.

The second question is, assuming that there isn’t another way, can anyone give me any idea of the degree of severity this will impact performance? The tables are relatively small (1000-2000 records), with about an average of 20 fields to be compared.

TIA,
George

Ubi caritas et amor, deus ibi est
Next
Reply
Map
View

Click here to load this message in the networking platform