|
Folks, I have the following UPDTAE TRIGGER and it will ALWAYS hit my check condition (RAISERROR) that is intended to stop duplicates. Can anyone tell me what I have wrong??? I am more of an Oracle person then SQL Server... CREATE TRIGGER TrgBlockDup_Radio_Cd ON dbo.labor FOR UPDATE AS BEGIN
I hit the RAISERROR when I am updtaing a duplicate value and also when not.... It works fine on the NULL... Thanks in advance, Miller
(comments are locked)
|
|
For an update trigger, you will have 1 or more rows in both Your first The second block will only execute if the To stop duplicates, I believe you want to use an A good answer. But why not use a unique index instead of a trigger if you want to prevent duplicates? Granted the unique index will stop duplicate inserts as well as duplicates in updates, but I would think that would be desirable.
Feb 05 '10 at 07:35 PM
TimothyAWiseman
(comments are locked)
|

