471,896 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.