|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Guys.
I have a trigger that updates a field in a table from a field in a second table. Seems straightforward enough, until we find that the fields are of type ntext length 16. The SQL works in SQL Analyzer but when i copy the exact code to create a trigger a Error 311: Cannot use text,ntext or image columns in the 'inserted' and 'deleted' tables. Any ideas? here is the full trigger CREATE TRIGGER updatelastactionotes ON [TABLE_NAME] FOR INSERT AS declare @tmpid bigint declare @notes varchar(350) set @notes =(select convert(varchar(350),notes) from inserted) set @tmpid =(select servicereqno from OLD_TABLE from inserted) update NEW_TABLE set lastactionnotes = convert(varchar(350),@notes) where servicereqno = @tmpid |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Trigger Issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|