|
Posted by Chandra on 06/09/05 06:34
Hi
For this you can create a composite primary key or this can be done by
using INSTEAD OF INSERT Trigger
something like this:
CREATE TRIGGER <TriggerName>
INSTEAD OF INSERT
AS
BEGIN
IF NOT EXISTS(SELECT * FROM bstresult INNER JOIN INSERTED ON
INSERTED.serial = bstresult.serial AND INSERTED.testresult =
bstresult.testresult)
INSERT INTO bstresult SELECT * from INSERTED
END
please let me know if it worked.
best Regards,
Chandra
http://groups.msn.com/SQLResource/
http://chanduas.blogspot.com/
---------------------------------------
*** Sent via Developersdex http://www.developersdex.com ***
Navigation:
[Reply to this message]
|