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!
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!