Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml representation in sql server 2000 stored procedure URGENT

Status
Not open for further replies.

spaliwal

Programmer
Dec 28, 2001
31
0
0
IN
Hi Gurus,

I am using following code segment in stored procedure -

DECLARE @hdoc int
DECLARE @doc nvarchar(4000)

select @doc = detailXML from Tab1 where col1 = val1

exec sp_xml_preparedocument @hdoc OUTPUT,@doc

select * from OPENXML(@hdoc,'Root/Customer',1)
with (CustomerID varchar(10),
CustomerName varchar(20))
exec sp_xml_removedocument @hdoc

but my field detailXML.Tab1 is of text datatype and of variable length , there is a limitation of stored proc local variable can not be defined as text datatype. As sp_xml_preparedocument support text as a input document, there must be some way out to take input doc (@doc) as text datatype.Is there any workaround or service pack or diffent way to do the same,Need a help urgently.

TIA,

Sheilesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top