mcnewsxp
2012-11-10 13:22:43 UTC
i created a an insert trigger that i expect to run during an import to an existing table from a spreadsheet. the trigger complied ok and the sql code within the trigger will run ok. what's the problem?
USE Stellar_PROD;
GO
IF OBJECT_ID ('dbo.ust_userid', 'TR') IS NOT NULL
DROP TRIGGER dbo.ust_userid;
GO
CREATE TRIGGER ust_userid
ON dbo.therapists
AFTER INSERT
AS
update therapists
set the_username = the_FirstName + left(the_LastName,1),
the_password = 'therapy'
GO
USE Stellar_PROD;
GO
IF OBJECT_ID ('dbo.ust_userid', 'TR') IS NOT NULL
DROP TRIGGER dbo.ust_userid;
GO
CREATE TRIGGER ust_userid
ON dbo.therapists
AFTER INSERT
AS
update therapists
set the_username = the_FirstName + left(the_LastName,1),
the_password = 'therapy'
GO