jjefferson
Technical User
I'm working on a trigger which selects column names from a table to determine which columns to "audit". The user can then add or remove column names from this control table and the trigger will not need modification. At least, that's what I hope to do.
I have a problem with the UPDATE() function. My trigger works fine when I use the actual column name (if update (realname)...).
However, I can't seem to use "if update (@tempname)...", where I've populated the @tempname variable with some column name.
Perhaps the function won't accept a variable. Or, it may be that this should work, and my problem is elsewhere, perhaps where I'm initializing the @tempname variable.
Thanks for any advice.
-Jim-
I have a problem with the UPDATE() function. My trigger works fine when I use the actual column name (if update (realname)...).
However, I can't seem to use "if update (@tempname)...", where I've populated the @tempname variable with some column name.
Perhaps the function won't accept a variable. Or, it may be that this should work, and my problem is elsewhere, perhaps where I'm initializing the @tempname variable.
Thanks for any advice.
-Jim-