Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Parameters in SQL XML

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-13 : 08:24:53
Jacek writes "How to use query templates for SQL with more then one parameter
in queries.
Syntax (base on XML for SQL docs) seems be
<root xmlns:sql="urn:schemas-microsoft-com:xml-sql"
[param1='value1]...] >
<sql:query>
sql statement(s)
</sql:query>
</root>

All available examples show that the following:

<root xmlns:sql="urn:schemas-microsoft-com:xml-sql"
CustomerID='ALFKI' >
<sql:query>
select * from Customers where CustomerID=?
</sql:query>
</root>

But what about this ???

<root xmlns:sql="urn:schemas-microsoft-com:xml-sql"
CustomerID='ALFKI' Freight='30.0'>
<sql:query>
select * from orders where CustomerID=? and Freight > ?
</sql:query>
</root>


Best regards,
Jacek W. Kowalski"
   

- Advertisement -