In my database there is a table, in which data inserted through .exe file.
Problem is that, the exe file is sending system data, not the server data....
So, I'm getting problem while watching current date data...
I can't change exe file...
So, I execute a trigger so that it'll change the date of the new row inserted to getdate()..
But it changes all the row of the users data from till date as there is no primary key on that table and I can't change database too.....
Hence, I'm asking:
Is there any process to change the date and time of that table to getdate() while new row inserting without giving a primary key to the table???
My trigger code is :
ALTER TRIGGER [change_dtentrytime]
ON [dbo].[dailytransaction]
AFTER INSERT
as
begin
update dailytransaction set dtentry=getdate() where intnoteid=(select intnoteid from inserted)
end
Anybody plz give some solution for this???
Thanks in advance.....