Question : Get Column Name in Trigger

I am using Infopath and two tables.  With Infopath I am writing to both tables.  I would like to create a trigger that will write data from the Main table to the Secondary table when a new row is inserted into the Main table.  When writing the data to the Secondary table I need to get the column names from the Main table as they will be inserted into the Secondary table as data.  Any ideas?

Answer : Get Column Name in Trigger

Use  COLUMNS_UPDATED

Andy Warren has a pretty good explanation here:

http://www.databasejournal.com/features/mssql/article.php/1479821/Using-ColumnsUpdated-in-a-Trigger.htm

Random Solutions  
 
programming4us programming4us