1. Pentru Query Analizer !
* Bagi codul asta in QA (Query Analizer)
* Merge 100% testat de mine
* Atentie! Doar characterele create dupa ce ai rulat scriptul vor avea 32000 la command.
Cod:
-- =============================================
-- Create Command for Dark Lord
-- (C) 2007 by Disconnect
-- Query Analizer
-- =============================================
CREATE TRIGGER [Update_Command] ON [dbo].[Character]
after Insert
as
Update [Character] set [Character].Leadership=32000
From Inserted
Where Inserted.Leadership=25 and
[Character].accountid=inserted.accountid
and [Character].name=inserted.name
2. Pentru SQL Server Agent (SQL Job)
Cod:
-- =============================================
-- Create Command for Dark Lord
-- (C) 2007 by Disconnect
-- Microsoft SQL Job
-- =============================================
UPDATE Character
SET Leadership= ('32000')
WHERE CtlCode<64