Solved

Returning ALL text data in Query Analyzer

Posted on 2003-11-19
1
591 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
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

911 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

23 Experts available now in Live!

Get 1:1 Help Now