Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable Scope
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Divers
Thread ID:
00663609
Message ID:
00663720
Vues:
22
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform