CREATE TRIGGER [UpdateForTime] ON dbo.Products
FOR UPDATE
AS
BEGIN
IF Not ((UPDATE(UpdateTime))
BEGIN
UPDATE dbo.products
SET UpdateTime=getdate()
WHERE Product_id IN (select product_id from inserted)
END
On Tue, 27 Jul 2004 14:29:59 -0500, Phill B <[EMAIL PROTECTED]> wrote:
> I want to make a trigger in MSSQL that updates a datetime field on
> inserts and updates. I've never made a trigger before so any
> suggestions are appreciated.
>
> Thanks
>
> --
> Phillip B.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

