Skip to content

Commit bee5ca0

Browse files
authored
Merge pull request #7012 from victren/patch-2
Update value-method-xml-data-type.md
2 parents e4cea8d + 72c5242 commit bee5ca0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/t-sql/xml/value-method-xml-data-type.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ SELECT @ProdID
7373

7474
```sql
7575
SELECT CatalogDescription.value('
76-
declare namespace PD="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
76+
declare namespace PD="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
7777
(/PD:ProductDescription/@ProductModelID)[1]', 'int') AS Result
7878
FROM Production.ProductModel
7979
WHERE CatalogDescription IS NOT NULL
@@ -102,12 +102,12 @@ ORDER BY Result DESC
102102

103103
```sql
104104
SELECT CatalogDescription.value('
105-
declare namespace PD="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
105+
declare namespace PD="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
106106
(/PD:ProductDescription/@ProductModelID)[1] ', 'int') AS Result
107107
FROM Production.ProductModel
108108
WHERE CatalogDescription.exist('
109-
declare namespace PD="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
110-
declare namespace wm="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain";
109+
declare namespace PD="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
110+
declare namespace wm="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain";
111111
112112
/PD:ProductDescription/PD:Features/wm:Warranty ') = 1
113113
```
@@ -139,7 +139,7 @@ GO
139139

140140
SELECT c1, c2, c3
141141
FROM T
142-
WHERE c3.value( '/root[1]/@a', 'integer') = c1
142+
WHERE c3.value( '(/root[@a=sql:column("c1")]/@a)[1]', 'integer') = c1
143143
GO
144144
```
145145

0 commit comments

Comments
 (0)