SQLServerCentral.com / Discuss Content Posted by Raj Vasant / Article Discussions / Article Discussions by Author / Manipulating Text Variables / Latest PostsInstantForum.NET v2.9.0SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comTue, 31 Mar 2015 14:57:59 GMT20RE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspxBe aware that in future versions of SS, the TEXT data type will be REMOVED! see BOL topic "Using text and image Data" <A href="http://msdn2.microsoft.com/en-us/library/ms189574(SQL.90).aspx">http://msdn2.microsoft.com/en-us/library/ms189574(SQL.90).aspx</A> Microsoft has introduced a new data type option called (MAX) to the varchar and binary types. It is an enhanced version of the text types and can do a lot more. If you upgraded to SS2005 then it is very recommended that you start using this option if you use large data. To find out more see the SS BOL topic "Using Large-Value Data Types" <A href="http://msdn2.microsoft.com/en-us/library/ms178158.aspx">http://msdn2.microsoft.com/en-us/library/ms178158.aspx</A> As an example, consider the previous user's comment re triggers. Now, it is possible to use large data inside triggers using this new data type. There is a lot more info in BOL (search for varchar(max) ).Thu, 16 Feb 2006 11:15:00 GMTSQLiorRE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>It is very nice to have a concise overview of text functions and handling. Well done!</P><P>There is a serious concideration with regards to triggers, however, since Text columns cannot be included.</P><P>an error "Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables." will occur.</P><P>If anybody has ideas for Archival functions using Triggers, let me know.</P><P> </P><P>Cheers,</P><P>John R. Hanson</P>Thu, 29 Sep 2005 18:09:00 GMTJohn R. HansonRE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>This article is great!</P><P>Text columns is not as rare as you think. I did not work yet with a piece of SW without Text data. ALL CRMs, Tracking Systems, everything that have notes or history to enter have Text data field, everything that have Description have Text data field, now we mentioned XML storage, you name it...</P><P>I really appreciate any guidance on working with Text data. </P>Wed, 28 Sep 2005 16:24:00 GMTYelena VarshalRE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>Joel,</P><P> </P><P>you can use Text as a parameter type (as noted in the article), but you are limited on how you process the information in the SP.</P><P>Dave</P>Wed, 28 Sep 2005 11:32:00 GMTDavid CathermanRE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>What is the best way to pass text information to a stored procedure? I don't think you can use the "text" type as a sp parameter. Right now I am using a varchar(5000) but that limits the size of the file I can save.</P><P>Joel</P>Wed, 28 Sep 2005 10:09:00 GMTjrh_1999RE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>Good article but it does not discuss the real problem with Text fields. I have a problem passing XML data from a Text field in a table to the sp_XML_preparedocument function. There is no way I can find to take the data out of the field and pass it to the function.</P><P>The only solution I have found is as the following link:</P><P><A href="http://www.awprofessional.com/articles/article.asp?p=102307&amp;seqNum=16&amp;rl=1">http://www.awprofessional.com/articles/article.asp?p=102307&amp;seqNum=16&amp;rl=1</A></P><P>where Ken Henderson provides a sample chapter of his book. His method is to dynamically break the long text into 4k chunks and then append them all together when calling the xml function. This is a good idea and has merit as a work around, but I have not gotten it to work yet.</P><P>If anyone else has any ideas, please let me know.</P><P>DCatherman at cmisolutions dot com</P>Wed, 28 Sep 2005 09:17:00 GMTDavid CathermanRE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>I am using text variable manipulation to construct customized plain text and HTML email messages for hundreds of thousands of customers...no two email messages are the same...each email message has a completely different product mix.</P><P>Through the use of a forward-read-only cursors, the entire mail-merge process of 35kilobyte-50kilobyte sized email messages can be completed in well under 3 hours.</P><P>Text data manipulation on a SQL Server platform is very, very fast and requires no additional software to be used. I've built other solutions but none have come close to matching the mail-merging speed of performing text data manipulation on the SQL Server box itself.</P><P>Text data manipulation is a skill very much worth learning.</P><P> </P>Wed, 28 Sep 2005 07:14:00 GMTMartin VriezeRE: Manipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspx<P>Awesome article! However you mention nothing about speed. Is this method faster than doing an update to a single row? Can you elaborate more on the pros and cons of using this method? Almost sounds too good to be true.Thanks!</P>Wed, 28 Sep 2005 06:04:00 GMTSean McDanielManipulating Text Variableshttp://www.sqlservercentral.com/Forums/Topic215145-227-1.aspxComments posted to this topic are about the content posted at <A HREF="http://www.sqlservercentral.com/columnists/rVasant/manipulatingtextvariables.asp">http://www.sqlservercentral.com/columnists/rVasant/manipulatingtextvariables.asp</A>Mon, 29 Aug 2005 21:11:00 GMTVasant Raj