Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 trigger is not saved

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-04-03 : 00:10:17
ALTER TRIGGER Trigger1
ON countries
FOR UPDATE AS
begin

insert into country1 values(:deleted.cid,:deleted.cname,getdate(),,system_user,@@servername, host_id(),host_name(),DB_NAME())
--select * from country1
/*insert into country1
select * from deleted*/

i want to store data into country1 table as old data with all information
end

IF I WANT TO SAVE THE ABOVE TRIGGER ERROR OCCURS
IAM USING SQL SERVER 2005

HELP ME

Malathi Rao

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-03 : 00:14:05
[code]
ALTER TRIGGER Trigger1
ON countries
FOR UPDATE AS
begin

insert into country1
select cid, cname, getdate(), system_user, @@servername, host_id(), host_name(), DB_NAME()
from deleted

end
[/code]


KH

Go to Top of Page

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-04-03 : 01:54:11
how can i capture the id of the particular employee loged in module



quote:
Originally posted by khtan


ALTER TRIGGER Trigger1
ON countries
FOR UPDATE AS
begin

insert into country1
select cid, cname, getdate(), system_user, @@servername, host_id(), host_name(), DB_NAME()
from deleted

end



KH





Malathi Rao
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-03 : 01:55:21
What is "ID"?

ID in local system? UserID in corporate network?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -