Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert trigger and batch updates
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2000
Application:
Web
Miscellaneous
Thread ID:
01383018
Message ID:
01383126
Views:
38
The AFTER triggers are to late for creating unique keys for multiple records because the constraints are processed before they are fired. You can submit some fake but unique values for the column in question in the INSERT command. They will be replaced anyway.

>Yes, this field is not used as my primary key (I always use IDENTITY surragate key) but is setup with unique constraint index. I'm not asking for a better way to setup the fields in the table (the requirement is what it is) but rather a solution to a specific problem I'm having with updating the value in this field inside a trigger when more than one record is inserted via a query. Thanks Sergey.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform