Solved

SQL Server 2000 - unable to select more than 255 characters from a text field

Posted on 2003-11-04
4
314 Views
Last Modified: 2008-02-07
SQLServer 2000

I have a table which contains a column with data type of 'text'. I can insert a large amount of data into this column - currently up to 3000 characters - which can be verified by selecting the 'len' value. I cannot, however, select more than 255 characters from this column at one time.

After some research I have checked:

select @@textsize      which returns the result 64512

My question is about the DB-Library function 'dbsetopt'. It appears that one of the options that can be set using this function is DBTEXTLIMIT. Could this be governing the amount of text I can select - and if so how can I find out what it is set to currently and change it?

I can select chunks of 255 from the field as a work around.

Thanks

Rosalind Abel
0
Comment
Question by:RosalindAbel
  • 2
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 250 total points
Comment Utility
in what environment are you trying to process this data...

show the select statement you've been using...?


this isn't just a query analyser max col size to display problem is it?
see either
query / options
or
tools /results...
depending on version
 

0
 

Author Comment

by:RosalindAbel
Comment Utility
Thank you - it is indeed a query analyser max col size  problem.

The environment is in SQL Server 2000, stored procedures. This large text field is going to be selected and placed in the @message parameter of the xp_sendmail procedure. Will the same problem occur?

Thanks for your help

Rosalind
0
 
LVL 50

Expert Comment

by:Lowfatspread
Comment Utility
probably not
will the column data include formating commands.... (lf, tabs, cr, etc)


if you go much bigger you may want to investigate displaying the message
as an attachment to the email... obtained via the executed query option of the
sendmail stored proc...

hth
;-)

0
 

Author Comment

by:RosalindAbel
Comment Utility
I have adjusted my stored procedure to stay within the 8000 character text limit imposed by the @message parameter of xp_sendmail and all is working fine.

Can I ask another xp_sendmail question -  Can I specify an alternative reply address using xp_sendmail?  I have text emails being sent out to multiple recipients and would like the receipients to be able to reply to a specific email address. This is to prevent one person having to attend to potentially hundreds of replies in one mailbox.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

744 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

16 Experts available now in Live!

Get 1:1 Help Now