Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datatype "Text" and Triggers

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
I can't seem to retrieve a datatype "text" from my table using a Trigger.
I'm using SQL Server 2000, it was working when i use SQL Server 6.5
----------------------------------------------------------
CREATE TRIGGER tblname_ITrigger ON dbo.tblname
FOR INSERT
AS
BEGIN
DECLARE @comments1 varchar(255)


SELECT @comments1 = CONVERT(varchar (255),inserted.comments_1)

FROM inserted
---------------------------------------------------------

Basically, what i'm trying to do is retrieve the dataype text (comments_1) which could contain more than 255 characters and CONVERT it.

I tried removing the 'convert' part, thinking that it might be the problem, but it didn't work. So i'm left with the conclusion that it might be bec the datatype is 'Text' instead of the normal 'varchar'

Thanks for any suggestion!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top