Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameter for IN ( '...', '...' )
Message
 
 
À
07/06/2007 11:04:56
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01230497
Message ID:
01231326
Vues:
17
IF @XmlList IS NULL
	SELECT * FROM orders ord
ELSE
BEGIN
	DECLARE @hDoc int
	EXECUTE sp_xml_preparedocument @hDoc OUTPUT, @XmlList
	SELECT * FROM orders ord
		JOIN OPENXML(@hDoc, 'VFPData/crslist') WITH (customer_id char(6) ) lst
			ON ord.CustomerId = lst.customer_id
	EXECUTE sp_xml_removedocument @hDoc
END
>I think I am trying to make my problem too hard here.
>
>Here is the example I was looking at:
>
>CREATE PROCEDURE usp_OrdersByList
>	@XmlList varchar(4000) = 0
>AS
>DECLARE @hDoc int
>EXECUTE sp_xml_preparedocument @hDoc OUTPUT, @XmlList
>SELECT * FROM orders ord
>	JOIN OPENXML(@hDoc, 'VFPData/crslist') WITH (customer_id char(6) ) lst
>		ON ord.CustomerId = lst.customer_id
>EXECUTE sp_xml_removedocument @hDoc
>
>
>How would I modify that if I wanted to pass in an empty XmlList parameter and show all customer_id's?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform