Hi,
This is my first attempt at a trigger and I seem to be having a bit of a brain freeze!
I insert a record into a table with basic user info, a trigger then grabs the newly inserted information and puts it into a second table for later use. However whenever i do this it takes everything that is currently in the table (new_user) and adds it to the second table (data)
I think I am being very slow here, but help please!
CREATE TRIGGER [INSERT_RECORD]
ON [dbo].[new_user]
FOR INSERT
AS
INSERT INTO data (emp_no)
SELECT new_user.user_id
FROM new_user
WHERE new_user.user_id = user_id
Thanks
Jamie
This is my first attempt at a trigger and I seem to be having a bit of a brain freeze!
I insert a record into a table with basic user info, a trigger then grabs the newly inserted information and puts it into a second table for later use. However whenever i do this it takes everything that is currently in the table (new_user) and adds it to the second table (data)
I think I am being very slow here, but help please!
CREATE TRIGGER [INSERT_RECORD]
ON [dbo].[new_user]
FOR INSERT
AS
INSERT INTO data (emp_no)
SELECT new_user.user_id
FROM new_user
WHERE new_user.user_id = user_id
Thanks
Jamie