Solved

Returning ALL text data in Query Analyzer

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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

626 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