Solved

Returning ALL text data in Query Analyzer

Posted on 2003-11-19
1
589 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
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…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

772 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

12 Experts available now in Live!

Get 1:1 Help Now