Posted on 2005-05-13
Last Modified: 2010-03-19
Hi folks,
   I have a question. In a SqlServer 2000 db, I have a table which has a column that contains the following <longtext>
It has been my understanding that this is actually a pointer to another table that contains the data. And I do not find the data type defined for "longtext" in sql bol, (but do find it defined as a datatype in Access.)
I need to update these fields with new data.
What is the best way to do this??  And why can't I see all the data when I do a select in QA??
Question by:bearpaws
    LVL 11

    Expert Comment


    longtext is what you get when select from a "text" field.

    not all the data is returned, because this kind of field can be huge.
    however, if you are using the field in an application, other than QA
    you WILL get all the data.

    updating this field is done by sql statements like so:

    update mytable
    set myTextField = 'huge line of text'

    Author Comment

    Oh yes, we receive all the data in an application.
    But I had noticed in QA I didn't receive it all nor do I see it all when I open the table in EM. And I thought the reason was because of its huge size. I wanted to be sure.
     I thought I would QA with an update statement to update the column with the new data.
    Do you see any problems with this approach??
    thanks :-)
    LVL 13

    Expert Comment

    QA has a column legth limit set to 256 characters by default, it can increased ti 8192. Limit of text field is above those limits - 2 GB (blob).

    T-SQL has special commands for text:
    which are incompatible with "text in row" table option.

    UPDATE,INSERT commands can move unchaged text fieds from one table to another.

    Usable ActiveX ADODB related to text:
    Stream object
    GetChunk,WriteChunk methods of Field
    LVL 11

    Accepted Solution

    not really

    you can just insert what you want in there.
    selecting this column might be a bit annoying,
    if you want to see the entire contents,
    but inserting or updating should pose no prob.
    LVL 13

    Expert Comment

    Read "it can increased ti" as "it can be increased to". It is Friday afternoon ;)

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now