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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Updating database using a Trigger Statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-07 : 09:05:53
Chris writes "I am trying to design an page which displays a table, called 'History', with the fields 'Date Created', 'Date Updated' and 'Status'.
The 'Date Created' will have to be the server date as when a record is entered into a table called 'Grace', which could be done upon Registration or Reinstating the user. Which means, the table appends a new date under 'Date Created' whenever a record is inserted into 'Grace'. How should a trigger statement be used in an ASP page when SQL statement such as Trigger is needed in my case?
If the user is in 'Grace', then 'Status' column of 'History' would show 'Unutilised'. How should i write the checking process to double check that the User is in 'Grace' only and not in another table, 'UsedGrace'? If the user exists in 'UsedGrace', the 'Status' of the table 'History', will display 'Utilised'.
If the User is moved to 'UsedGrace', how do i trigger the 'Date Updated' to be this date when user is moved over, which means, 'date Updated' is changed whenever the user is iserted into 'Grace', and when user is moved into 'UsedGrace'? How do i trigger the 'Date Updated' to be these dates?

Thanx !!!"
   

- Advertisement -