3>
4> CREATE TABLE dbo.ProductBilling
5> (ProductBillingID int IDENTITY(1,1) PRIMARY KEY,
6> ProductBillingXML XML NOT NULL)
7> GO
1>
2> INSERT dbo.ProductBilling(ProductBillingXML)
3> VALUES ('
4~
5~
6~
7~
8~ ')
9>
10> INSERT dbo.ProductBilling
11> (ProductBillingXML)
12> VALUES ('
13~
14~
15~
16~ ')
17>
18> INSERT dbo.ProductBilling
19> (ProductBillingXML)
20> VALUES ('
21~
22~
23~
24~
25~ ')
26>
27> set quoted_identifier on
28>
29> SELECT ProductBillingID
30> FROM dbo.ProductBilling
31> WHERE ProductBillingXML.exist
32> ('/ProductBilling/OrderItems/Item[@id=11]') = 1
33> GO
(1 rows affected)
(1 rows affected)
(1 rows affected)
ProductBillingID
----------------
2
3
(2 rows affected)
1>
2> set quoted_identifier off
3>
4> drop table dbo.ProductBilling
5> GO