@@ -27,7 +27,7 @@ ms.author: jroth
2727
2828``` syntaxsql
2929insert Expression1 (
30- {AS first | AS last} INTO | AFTER | BEFORE
30+ {as first | as last} into | after | before
3131Expression2
3232)
3333```
@@ -68,29 +68,29 @@ SET @myDoc = '<Root>
6868SELECT @myDoc;
6969-- insert first feature child (no need to specify as first or as last)
7070SET @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]' ) ;
7373SELECT @myDoc ;
7474-- insert second feature. We want this to be the first in sequence so use 'as first'
7575SET @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' ) ;
8080SELECT @myDoc ;
8181-- insert third feature child. This one is the last child of <Features> so use 'as last'
8282SELECT @myDoc
8383SET @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' )
8888SELECT @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)
9191SELECT @myDoc ;
9292SET @myDoc .modify ('
93- INSERT <BikeFrame>Strong long lasting</BikeFrame>
93+ insert <BikeFrame>Strong long lasting</BikeFrame>
9494AFTER (/Root/ProductDescription/Features/Material)[1]
9595' ) ;
9696SELECT @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] ' );
160160SELECT @myDoc;
161161GO
162162```
0 commit comments