Triggers that update a column name in the master table
Triggers that update a column name in the master table
I would appreciate any insight. I'm new with SQL and am trying to get a trigger to function. Here is what I'm trying to accomplish. I have a table called Asset_master that contains assets that are available, with a column_id of status=available. Once a users selects the available asset from the form, I have it writing a new record to another table called asset_provisioned. I'm trying to use a trigger to change the status=available to status=provisioned upon insert or update to the asset_provisoned table. My trigger works as enclosed however it replaces all the columns with provisioned and not the newly inserted row. Any help would be greatly appreciated.
I'm using SQL 2005 Developers
TRIGGER:
set
ANSI_NULLS ON set
QUOTED_IDENTIFIER ON go
-- Creation date:
-- Author:
ALTER TRIGGER [dbo].[provisioned] ON [dbo].[asset_provisioned] FOR
INSERT AS
UPDATE
asset_master set status='provisioned'
Triggers that update a column name in the master table
jasonc65