943,353 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 8005
  • MS SQL RSS
Jun 11th, 2004
0

Ms Sql 2000

Expand Post »
I need to create a date updated field for ms sql 2000. The current trigger I have only works for the insertion of data and it is "(getdate())" is there one that I can use for insertion and update of fields?

Ta,

Slade
Similar Threads
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
Jun 15th, 2004
1

Re: Ms Sql 2000

Quote originally posted by slade ...
I need to create a date updated field for ms sql 2000. The current trigger I have only works for the insertion of data and it is "(getdate())" is there one that I can use for insertion and update of fields?
You can write a trigger that fires on both insert and update:

CREATE TRIGGER <trigger_name>
ON <table_name>
FOR INSERT, UPDATE
AS
<trigger_body>

Here's the T-SQL reference page:
http://msdn.microsoft.com/library/de...eate2_7eeq.asp
Reputation Points: 182
Solved Threads: 71
Posting Pro in Training
gusano79 is offline Offline
475 posts
since May 2004
Jun 15th, 2004
0

Re: Ms Sql 2000

Thankyou very much, your help will not go unrewarded.
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: I need an exampls program in java to store image datatype in ms-sql
Next Thread in MS SQL Forum Timeline: SQL access via Dreamweaver 2004 MX





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC