Solved

Returning ALL text data in Query Analyzer

Posted on 2003-11-19
1
594 Views
Last Modified: 2012-08-13
I want to return all data from a text column that has over 30000 characters in Query Analyzer.  I have tried

set textsize 64512


select MyText from MyTable

set textsize 4096 -- same as set textsize 0

I have also tried

set textsize 64512

declare @TextPointer binary(16)
declare @DataLen int

select @DataLen = DATALENGTH(MyText) from MyTable
select @TextPointer = TEXTPTR(MyText) from MyTable
READTEXT MyTable.MyText @TextPointer 0 @DataLen

set textsize 4096


No Matter what I do, all I get in the results is the first 254 chars.  I know that either I cannot do it, or it is easy, but I cannot seem to find out what I am doing wrong.

Please advise.  

Bonus for a quick solution and code examples.

cjm
0
Comment
Question by:cjm30305
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
wsteegmans earned 300 total points
ID: 9782970
By default Query Analyzer (ISQLW) displays only 256 characters per line in the results tab. You can configure Query Analyzer to display a maximum of 8192 lines per line. Follow these steps:

If you are using the Query Analyzer of Server 2000, go to Tools -> Options -> Results tab -> Enter the number 8192 in the "Maximum characters per column:" text box.

If you are using the Query Analyzer of Server 7.0, go to Query -> Current Connection Options -> Advanced tab -> Enter the number 8192 in the "Maximum characters per column:" text box.

So, if you want your 30000 characters, I'm afraid you have to use another tool ... Maybe link your SQL-Tables in an Access-DB or something like that ...

Good luck!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

738 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