Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 INSERTED trigger table does not accept TEXT field

Author  Topic 

henrikop
Constraint Violating Yak Guru

280 Posts

Posted - 2004-05-03 : 11:06:57
Hiya,

I have a trigger which fills another table with some of the information on the triggered table.

One of the columns is data type TEXT.

If I use an

INSERT INTO SomeTable (a data type TEXT field) SELECT Note FROM INSERTED

Where the destination table has a TEXT field and the triggered table has the TEXT field Note.

I get the error that inserting TEXT fields is not permitted on INSERTED table.

How to work around this?


Henri
~~~~
It's taken a long time, but I've just about learned how to quit flapping my arms and float. It's good to float.
-Al Pacino

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-03 : 11:11:18
Use an instead of trigger or join to the table using the PK from inserted and use the value there.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

henrikop
Constraint Violating Yak Guru

280 Posts

Posted - 2004-05-03 : 13:06:39
It was a struggle, but you'te right, thx.

Henri
~~~~
It's taken a long time, but I've just about learned how to quit flapping my arms and float. It's good to float.
-Al Pacino
Go to Top of Page
   

- Advertisement -