Solved

Returning ALL text data in Query Analyzer

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

830 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