[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Not getting all the ntext data when I select on that field

Posted on 2007-07-30
Medium Priority
Last Modified: 2008-02-01
Hello all,

I've got a column of type ntext (length is 16 if that matters).  I'm selecting it, but all the data is not being returned to my query.  

Normally this column contains long descriptions (not crazy long, maybe in the hundreds of characters at the most).

I have a simple Access front end which displays this text in it's entirety just fine, but when I "select columnName from table for xml raw" I'm getting back incomplete data in the Query Analyzer for those rows where the description is longer than 100 characters or so (haven't counted).

I need to get XML output from the query containing complete data so I can use the XML downstream.
 How can I get complete data?

Thanks for any hints!
Question by:vlg
LVL 13

Accepted Solution

ispaleny earned 1000 total points
ID: 19596765
From BOL:
SET TEXTSIZE { number }
Setting SET TEXTSIZE affects the @@TEXTSIZE function.
The SQL Server ODBC driver and Microsoft OLE DB Provider for SQL Server automatically set TEXTSIZE to 2147483647 when connecting.

In QA, by default text column is limited to 256 characters. Increase to 8192 on Resuls tab of Options.
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19597871
>I've got a column of type ntext (length is 16 if that matters).
note: the 16 is only the (fixed) size of the pointer, not of the data.
text/ntext are stored outside the actual row data, and hence do not count as such for the row length.

for the rest, ispaleny has given a good hint (points to him if that solved the trouble)

Author Comment

ID: 19601565
Thanks to you both.  

FWIW, both tweaks were required in this case.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.
Suggested Courses

872 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