Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Triggers & Capturing Data via INSERTED and DELETED tables
Message
From
21/02/1999 19:33:28
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Triggers & Capturing Data via INSERTED and DELETED tables
Miscellaneous
Thread ID:
00189833
Message ID:
00189833
Views:
56
I created a trigger for a table and was able to capture a value from the INSERTED and DELETED temp tables for fields that are defined as INTERGER and CHARACTER datatype. My Problem is that I'am unable to do the same for a field that is define as a TEXT datatype. The first two SELECT statements listed below work OK, but the second set of SELECT statements listed below do not work. MADDRESS field has a datatype of TEXT. The result is that the variables @DeletedmAddress and @InsertedmAddress seem to contain the values from the INSERTED tables. The value from the DELETED table is overlooked. I am wondering if this is a bug in MicroSoft SQL Enterprise Manager version 6.50.201. I would appreciate some help or explanation of my problem. PLEASE RESPOND.......

/* **** Capture values from Deleted and Inserted table */
SELECT @DeletediAddType = (SELECT iAddType FROM DELETED)
SELECT @InsertediAddType = (SELECT iAddType FROM INSERTED)


SELECT @DeletedmAddress = (SELECT CONVERT(VARCHAR (20),mAddress) FROM DELETED)
SELECT @InsertedmAddress = (SELECT CONVERT(VARCHAR(20),mAddress) FROM INSERTED)
Next
Reply
Map
View

Click here to load this message in the networking platform