Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameter for IN ( '...', '...' )
Message
De
07/06/2007 11:16:08
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:
01231328
Vues:
15
I see. Maybe it would be easier if I passed in all the batches instead of none. Thanks for the help!

>
>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?
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform