Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameter for IN ( '...', '...' )
Message
 
 
To
07/06/2007 11:04:56
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01230497
Message ID:
01231326
Views:
22
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform