User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 373,936 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,802 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 6859 | Replies: 2
Reply
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is online now Online
Practically a Master Poster

Ms Sql 2000

  #1  
Jun 11th, 2004
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
Formerly known as Slade.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2004
Posts: 43
Reputation: gusano79 is on a distinguished road 
Rep Power: 5
Solved Threads: 1
gusano79 gusano79 is offline Offline
Light Poster

Re: Ms Sql 2000

  #2  
Jun 15th, 2004
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
Reply With Quote  
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is online now Online
Practically a Master Poster

Re: Ms Sql 2000

  #3  
Jun 15th, 2004
Thankyou very much, your help will not go unrewarded.
Formerly known as Slade.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC