-
I am trying do a update with a trigger?
Hello,
I am new to this and on my way to learning. I hope someone can help me with a trigger. I want to update status of one table when I insert a new threat in another. This is what I have come up with so far.
CREATE TRIGGER [trg_Update_Status] ON tForumThread
FOR INSERT
AS
BEGIN
UPDATE tJournalTopic (STATUS_ID)
SELECT STATUS_ID
FROM Inserted
Thanks,
Linkan
-
I am trying do a update with a trigger? (reply)
try....
CREATE TRIGGER [trg_Update_Status] ON tForumThread
FOR INSERT
AS
BEGIN
UPDATE tJournalTopic
SET tJournalTopic.STATUS_ID = inserted.STATUS_ID
FROM tJournalTopic, inserted
------------
Linkan at 2/22/01 2:41:23 PM
Hello,
I am new to this and on my way to learning. I hope someone can help me with a trigger. I want to update status of one table when I insert a new threat in another. This is what I have come up with so far.
CREATE TRIGGER [trg_Update_Status] ON tForumThread
FOR INSERT
AS
BEGIN
UPDATE tJournalTopic (STATUS_ID)
SELECT STATUS_ID
FROM Inserted
Thanks,
Linkan
-
I am trying do a update with a trigger? (reply)
Paul,
Thanks for your help I got it working now.
Thanks agan,
//Linkan
------------
Paul at 2/23/01 9:31:38 AM
try....
CREATE TRIGGER [trg_Update_Status] ON tForumThread
FOR INSERT
AS
BEGIN
UPDATE tJournalTopic
SET tJournalTopic.STATUS_ID = inserted.STATUS_ID
FROM tJournalTopic, inserted
------------
Linkan at 2/22/01 2:41:23 PM
Hello,
I am new to this and on my way to learning. I hope someone can help me with a trigger. I want to update status of one table when I insert a new threat in another. This is what I have come up with so far.
CREATE TRIGGER [trg_Update_Status] ON tForumThread
FOR INSERT
AS
BEGIN
UPDATE tJournalTopic (STATUS_ID)
SELECT STATUS_ID
FROM Inserted
Thanks,
Linkan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|