[dba-SQLServer] Selecting Text field

Major, Joyce Joyce.Major at acsalaska.com
Thu Jan 12 13:41:39 CST 2006


I posted this in December, but never got a response.  Maybe someone can
help?

 

I am using the following query to read a field defined as Text in SQL
Server 2000.  It is returning the length of the field as 1756 and won't
let me get at any more of the field.  In reality, this particular record
has a field length of close to 10,000 for the field in question.  The
purchased application (I can't see the code it uses) returns all of the
data, but I can only get at part of it using Enterprise Manager.  Does
anyone have suggestions or methods that they have used successfully?

 

DECLARE @textpointer varbinary(16),

            @textlength integer

SELECT @textpointer = TEXTPTR(C536870930),

            @textlength = DATALENGTH(C536870930) - 1000

FROM T97

WHERE C1 = 'TMS643891'

READTEXT T97.C536870930 @textpointer @textlength 1000

 

Joyce Major

(907) 564-1294 Ofc

(907) 529-0147 Cell

(907) 564-8596 Fax

jmajor at acsalaska.com

 


***********************************************************************************
This transmittal may contain confidential information intended solely for
the addressee. If you are not the intended recipient, you are hereby
notified that you have received this transmittal in error; any review,
dissemination, distribution or copying of this transmittal is strictly
prohibited. If you have received this communication in error, please notify
us immediately by reply or by telephone (collect at 907-564-1000) and ask to
speak with the message sender. In addition, please immediately delete this
message and all attachments. Thank you. ACS





More information about the dba-SQLServer mailing list