469,281 Members | 2,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

Text datatype

I have a problem within a procedure I am working on. I would like to
process every column in a table in a cursor. Now to my problem, I
can't save a column of type text into a cursor variable. It's not
allowed to use datafields of type text in this context. I also think
that I runned in to a simular kind of problem when trying to use text
columns in triggers.

Is there a way to evade this problem or is the only solutions to put
the text colum value into a varchar(8000)?

Regards,
Jenny
Jul 20 '05 #1
1 4701
Jenny (je***@megasol.se) writes:
I have a problem within a procedure I am working on. I would like to
process every column in a table in a cursor. Now to my problem, I
can't save a column of type text into a cursor variable. It's not
allowed to use datafields of type text in this context. I also think
that I runned in to a simular kind of problem when trying to use text
columns in triggers.

Is there a way to evade this problem or is the only solutions to put
the text colum value into a varchar(8000)?


In which case you will only get the first 8000 characters in the
text value. What you are you going to do with anyway?

The best would of course to be to try to avoid to use a cursor at all,
since using cursors is in the very most cases magnitudes slower than
set-based operations.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Steemer | last post: by
1 post views Thread by voidfill3d | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.