Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable Scope
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Miscellaneous
Thread ID:
00663609
Message ID:
00663720
Views:
24
I don't know what this code does but it produces some results. :)
CREATE procedure dbo.getdata_wayne
	@doc as ntext, @sql_string as ntext
AS
declare @idoc int
	-- Parse XML String	
	EXEC sp_xml_preparedocument @idoc OUTPUT, @doc
	-- Select data
	EXEC sp_executesql @sql_string, N'@idoc int', @idoc
	-- Remove XML document		
	EXEC sp_xml_removedocument @idoc
GO
exec getdata_wayne '<A><B>99WCAL138462</B></A>', 
'SELECT * FROM OPENXML (@idoc, ''/A/B'',2)'

exec getdata_wayne '<ROOT><ID_S KEYVALUE=''99WCAL138462''/></ROOT>', 
'SELECT * FROM OPENXML (@idoc, ''/ROOT/ID_S'',1)'
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform