Hey i was wondering if you guys could help me. I need to create a trigger for a view. I had two tables which i mixed together with a view, and now i need to create a INSTEAD OF INSERT trigger which puts the data back into both tables. Here is what i have so far....SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TRIGGER RowInsert ON Combined INSTEAD OF INSERTAS Declare @NewWorkid char(4), @NewTitle char(25), @NewDescription varchar(1000), @NewCopy char(8), @NewArtistId char(3)Declare @NewTransactionId char(4), @NewDateAcquired datetime, @NewPurchaseDate datetime, @NewSalesPrice numeric(8,2), @NewAskingPrice numeric(8,2) @NewCustomerId char(3)Declare @OldWorkid char(4), @OldTitle char(25), @OldDescription varchar(1000), @OldCopy char(8), @OldArtistId char(3)Declare @OldTransactionId char(4), @OldDateAcquired datetime, @OldPurchaseDate datetime, @OldSalesPrice numeric(8,2), @OldAskingPrice numeric(8,2) @OldCustomerId char(3)Select @NewWorkid = WorkId, @NewTitle = Title, @NewDescription = Description, @NewCopy = Copy, @NewArtistId = ArtistId, @NewTransactionId = TransactionId, @NewDateAcquired = DateAcquired, @NewAcquisitionPrice= AcquisitionPrice, @NewPurchaseDate = PurchaseDate, @NewSalesPrice = SalesPrice, @NewAskingPrice = AskingPrice, @NewCustomerId = CustomerIdfrom insertedSelect @OldWorkid = WorkId, @OldTitle = Title, @OldDescription = Description, @OldCopy = Copy, @OldArtistId = ArtistId, @OldTransactionId = TransactionId, @OldDateAcquired = DateAcquired, @OldAcquisitionPrice= AcquisitionPrice, @OldPurchaseDate = PurchaseDate, @OldSalesPrice = SalesPrice, @OldAskingPrice = AskingPrice, @OldCustomerId = CustomerIdfrom deletedBEGIN ENDGO
I don't quite know the syntax which would put the two forms of data back in. Any help would be greatly appreciated.