Re: New to Triggers Dave,
Actually I was suggesting you, NOT to use a trigger at all, instead use the
DEFAULT keyword in your INSERT & UPDATE statements directly. So when you do
your UDPATE, you simply do:
UPDATE tbl
SET ....
ModBy = DEFAULT,
ModDate = DEFAULT
WHERE ...;
If you have a WHERE clause it will limit the number of rows based on the
WHERE clause condition & the DEFAULT will be effective for those rows only.
If you do not use a WHERE clause, all rows are updated & the DEFAULT is
applicable for all the rows in the table. Is that making sense?
--
-- Anith
( Please reply to newsgroups only ) |