Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 22nd, 2005, 12:09 PM
martij2 martij2 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 martij2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 15 sec
Reputation Power: 0
Question Trigger Issue

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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > Trigger Issue


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT