text field

  • Hi to all:

    I'm trying to insert a hole script into a column for administering purposes.

    I've never used a text field so I'm needing help. I have the script in a varchar(8000) variable and

    then I inserted into the table with the text field. But the problem is that when I select that field the data is truncated.

    So, how can I saved in a table a large script?

    Thanks to all

  • Are you saying that, the data is truncated when you issue a select statement on the text column in Query Analyzer.

    This will be the case because, the query analyzer by default selects maximum of 256 characters only per field.

    To get full data in QA you can do one of the following

    1. SET TEXT SIZE 8000

    Then issue the select statement

    2. Change the limit in menu Query->Current Connection options -> advanced

  • This solution will show you the whole text field in the grid. If you just want to read what's in the text field, try,

    DECLARE @text varchar(8000)

    SELECT @variable =<field_name>FROM <table_name WHERE <condition>

    PRINT @variable

    So you can see the whole text at once in QA.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thanks guys, it is done. It was very simple.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply