Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trigger is locking up record
Message
De
29/04/2004 08:10:31
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00899034
Message ID:
00899263
Vues:
16
CREATE TRIGGER [TESTING] ON dbo.Table1
FOR INSERT, UPDATE
AS

DECLARE @testingTable1ID int
DECLARE @Data1 char(10)

SET @testingTable1ID = (SELECT testingTable1ID from inserted)

SET @Data1 = (SELECT TT1Data1 From Table1 where testingTable1ID = @testingTable1ID)

insert into Table2 (TT2Data1) values (@Data1)

--=============================
CREATE TRIGGER [TESTING2] ON dbo.Table2
FOR INSERT, UPDATE
AS

DECLARE @testingTable2ID int
DECLARE @Data2 char(10)

SET @testingTable2ID = (SELECT testingTable2ID from inserted)

update Table2
set TT2Data2 = 'whatever'
where testingTable2ID = @testingTable2ID
Thank You

Rollin Burr

Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform