Delete trigger
my question is when i delete record from table.it will insert on another table...bt point is record included with image datatype.so how it can insert with another table.pls sugest me.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Anil KumarRank #367 · 6.8K reputationPosted Oct 18, 2012, 2:57 AM EDT
insert into tblName(fieldsName)
select fieldsName from deleted
Note: MS SQL doesn't allow image field reference in magic tables. So the above will through error if compatibility level is high i.e. 70 otherwise NULL value or Not NULL String value. There are few other data-types that cause the same issue are - ntext, text.
So, above mentioned command wouldn't work and you have to either-
1) convert data-type or
2) you can use Instead Of Trigger in place of After Trigger.
vikas kanani147 reputationPosted Oct 18, 2012, 4:56 AM EDT
Anil KumarRank #367 · 6.8K reputationPosted Oct 18, 2012, 8:18 AM EDT