Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Triggers and Text data types.

Author  Topic 

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2001-10-09 : 00:43:54
SQL Server 7

Does anybody know how to get the data from a text column in the deleted
table of a trigger?

According to BOL (2000):

"In a DELETE, INSERT, or UPDATE trigger, SQL Server does not allow text,
ntext, or image column references in the inserted and deleted tables if the
compatibility level is equal to 70. The text, ntext, and image values in the
inserted and deleted tables cannot be accessed. To retrieve the new value in
either an INSERT or UPDATE trigger, join the inserted table with the
original update table. When the compatibility level is 65 or lower, null
values are returned for inserted or deleted text, ntext, or image columns
that allow null values; zero-length strings are returned if the columns are
not nullable.
If the compatibility level is 80 or higher, SQL Server allows the update of
text, ntext, or image columns through the INSTEAD OF trigger on tables or
views."

I need the deleted table data..

Any ideas??



DavidM

Want a job in 10 years?. Prepare for "Tutorial D"
   

- Advertisement -