Hi,
This maybe a simple question, but I am trying to create a query to update a record within a database with a huge number of columns (somewhere around 200+).
My trigger so far is as follows, where it updates a record with a new date, but I need this to update each column. I read a number of posts and loops seem to cause delays and other problmes, so is there an easy way of doing this or do i have to do it long hand, i.e
data.name = inserted.name, data.date = inserted.date, etc, etc (which would take forever!)
CREATE TRIGGER [UPDATE]
ON [dbo].[TeleForm]
FOR INSERT
AS
UPDATE data
SET endDate = 01/01/2004
FROM inserted
WHERE data.Emp_No = inserted.Emp_No and inserted.complete = 1
Hope you can help me!
Regards
Jamie
This maybe a simple question, but I am trying to create a query to update a record within a database with a huge number of columns (somewhere around 200+).
My trigger so far is as follows, where it updates a record with a new date, but I need this to update each column. I read a number of posts and loops seem to cause delays and other problmes, so is there an easy way of doing this or do i have to do it long hand, i.e
data.name = inserted.name, data.date = inserted.date, etc, etc (which would take forever!)
CREATE TRIGGER [UPDATE]
ON [dbo].[TeleForm]
FOR INSERT
AS
UPDATE data
SET endDate = 01/01/2004
FROM inserted
WHERE data.Emp_No = inserted.Emp_No and inserted.complete = 1
Hope you can help me!
Regards
Jamie