Skip to content

Commit 98f3a40

Browse files
authored
XQuery is case-sensitive and the code included multiple UPPER CASE instead of LOWER CASE
XQuery is case-sensitive and the code included multiple UPPER CASE instead of LOWER CASE for example XQuery modify function uses "insert" instead of "INSERT"
1 parent 0f918a9 commit 98f3a40

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

docs/t-sql/xml/insert-xml-dml.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ms.author: jroth
2727

2828
```syntaxsql
2929
insert Expression1 (
30-
{AS first | AS last} INTO | AFTER | BEFORE
30+
{as first | as last} into | after | before
3131
Expression2
3232
)
3333
```
@@ -68,29 +68,29 @@ SET @myDoc = '<Root>
6868
SELECT @myDoc;
6969
-- insert first feature child (no need to specify as first or as last)
7070
SET @myDoc.modify('
71-
INSERT <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
72-
INTO (/Root/ProductDescription/Features)[1]') ;
71+
insert <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
72+
into (/Root/ProductDescription/Features)[1]') ;
7373
SELECT @myDoc ;
7474
-- insert second feature. We want this to be the first in sequence so use 'as first'
7575
SET @myDoc.modify('
76-
INSERT <Warranty>1 year parts and labor</Warranty>
77-
AS first
78-
INTO (/Root/ProductDescription/Features)[1]
76+
insert <Warranty>1 year parts and labor</Warranty>
77+
as first
78+
into (/Root/ProductDescription/Features)[1]
7979
') ;
8080
SELECT @myDoc ;
8181
-- insert third feature child. This one is the last child of <Features> so use 'as last'
8282
SELECT @myDoc
8383
SET @myDoc.modify('
84-
INSERT <Material>Aluminium</Material>
85-
AS last
86-
INTO (/Root/ProductDescription/Features)[1]
84+
insert <Material>Aluminium</Material>
85+
as last
86+
into (/Root/ProductDescription/Features)[1]
8787
')
8888
SELECT @myDoc ;
8989
-- Add fourth feature - this time as a sibling (and not a child)
9090
-- 'after' keyword is used (instead of as first or as last child)
9191
SELECT @myDoc ;
9292
SET @myDoc.modify('
93-
INSERT <BikeFrame>Strong long lasting</BikeFrame>
93+
insert <BikeFrame>Strong long lasting</BikeFrame>
9494
AFTER (/Root/ProductDescription/Features/Material)[1]
9595
') ;
9696
SELECT @myDoc;
@@ -156,7 +156,7 @@ insert (
156156
attribute SetupHours {".5" },
157157
attribute SomeOtherAtt {".2"}
158158
)
159-
INTO (/Root/Location[@LocationID=10])[1] ');
159+
into (/Root/Location[@LocationID=10])[1] ');
160160
SELECT @myDoc;
161161
GO
162162
```

0 commit comments

Comments
 (0)