You will need to use a stored procedure that posts into a temporary table (#table) then do a select on that.
eg)
CREATE STORED PROCEDURE sp1
AS
BEGIN
CREATE TABLE #temp (f1 VARCHAR(10))
<create a cursor over your table>
<if f1 has changed then insert into temp page break (if not first) and...
I want to create an audit trail system in my db but only on certain tables and columns. I know I can do:
IF UPDATE(col1)
.
.
IF UPDATE(col2)
.
etc, etc
what I whant to do is pull in the list of updated columns from the triggering command so I can use a table to control the auditted columns...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.