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:
00663669
Vues:
21
>Try
SET @sql_string = REPLACE(@sql_string, '@@idoc', CAST(@idoc AS varchar(10)))
>EXEC (@sql_string)
BTW, why it's @@idoc in the @sql_string?
>

That won't really help either... it works like this;
CREATE procedure dbo.getdata_wayne
@doc as ntext

AS

declare @idoc int
	-- Parse XML String	
	EXEC sp_xml_preparedocument @idoc OUTPUT, @doc
	-- Get Data
            SELECT * 
              FROM OPENXML (@idoc, '/ROOT/ID_S',1) WITH 
               (KEYVALUE varchar(16)) AS JT, PREMIUMHEADER
                WHERE PREMIUMHEADER.CPOLICYNUM = JT.KEYVALUE
	-- Remove XML document		
	EXEC sp_xml_removedocument @idoc
GO
Calling it with
exec getdata_wayne '<ROOT><ID_S KEYVALUE="99WCAL138462"/></ROOT>'
But because I'm creating a dynamic where, select list, etc, I don't have the same select.
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform