Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SP for all tables

Status
Not open for further replies.

ipazzo

Programmer
Jan 17, 2002
69
IT
Hi all,

is it possible to make a stored procedure taht work for all tables ?

what i need is to set values for two fields (usermod, datemod) that i have in all tables in my database, with the current database user an current datetime values.

Thanks in advance.

Regards.
 
s it possible to make a stored procedure trigger that work for all tables

sorry for the mistake


Vito M. from BARI (Italy)
---------------------------------------
When you build a TEAM, try always those that they love to win. If you do not succeed to find them, then try those that they hate to lose. Ross Perot
 
You can't have a single trigger that acts on all tables, no. You would have to create separate triggers on every table.

--James
 
Nope. You must write trigger for each table individually.

And for this case I think that column defaults are more suitable than triggers anyway.
 
vongrunt, the way I read it, ipazzo wanted these fields updated whenever the row was modified (usermod, datemod) not just inserted (ie an update trigger).

I agree defaults would be a good idea to get the initial data though.

--James
 
Thanks for your the replays, I previewed this :(, no chance.

you are right JamesLean i want to update these fields every time a row is modified.




Vito M. from BARI (Italy)
---------------------------------------
When you build a TEAM, try always those that they love to win. If you do not succeed to find them, then try those that they hate to lose. Ross Perot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top