Hi, I have following tables and a view:
TableStaff (UserId,Username,Firstname,Lastname)
TableFeatures (UserId,Option,Notes,LogDate)
TableExport( UserId,Username,Firstname,Lastname,Feature,Notes)
ViewStaff( UserId,Username,Firstname,Lastname, Feature,Notes)
Is it possible to create a trigger onViewStaff which can do following:
When data is inserted with the "Feature" column then it will copy UserId, Username, Firstname, Lastname, Option, Notes to theTableExport.
I have tried following, however when data is inserted it is not copying to the TableExport
SQL
CREATETRIGGERtrig_Staff1ONViewStaffINSTEADOFINSERTASBEGININSERTINTOTableExport(UserId,Username,Firstname,Lastname,Feature,Notes)SELECTUserId,Username,Firstname,Lastname,Feature,NotesfromInsertedEND
Any help would be much appreciated, thank you.