Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to update datetime field automatically
Message
De
16/07/2007 08:06:44
 
 
À
15/07/2007 22:27:58
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01240587
Message ID:
01240625
Vues:
13
>I have a database which has many table with 'updatedon' field of datetime type. These are updated on the client side. I want then to be updated on the server through triggers. And possibly with only one procedure called by all the table.
>
>1> How can I dynamically find out the table contains updatedon field and its type.
>2> Is there any globally called trigger called by every table in the database which will update the field.
>
>
>Rajesh



I use the simpler method of adding default code to the column: GetDate() and mark them as "not null".
Therefore if the date value is not supplied in Update and Insert statements, the table automatically will insert the proper DateTime.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform