Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How do I use a text field to prepare a document for OPENXML

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-06 : 09:16:26
Mohammed writes "Hello

SQLServer2000 question.

I want to use OPENXML to process an XML document that is contained in a text field from Query Analyser. However in SqlServer7 you were able to set the max chars before truncation to a high value whereas in SqlServer2000 this has been reduced to a lower number.

I have a text field that contains an XML document. When I process large XML documents I do not know how to prepare the document for OPENXML. I have tried to use pointers do you know how?

declare @ptr as varbinary(16)
declare @name as varchar(20)

select @ptr=textptr(xm), @name=name from patients where patnt_refno = 4

select @name
select @ptr

declare @hdoc as int

-- This now fails .... how can I prepare a pointer to a text field containing an XML document.
exec sp_xml_preparedocument @hdoc OUTPUT, @ptr

regards
Mohammed"
   

- Advertisement -