XML DML UPDATING XML COLUMNS 134 10 Chicken Patties

XML DML UPDATING XML COLUMNS 134 10 Chicken Patties 9.95 153 5 Vanilla Ice Cream 1.50 GO You could insert a new InvoiceDateelement as a child of the Invoice element using the following statement. SET @x.modify( insert 2002-06-15 into /Invoice[1] ) This statement would insert the InvoiceDate element as the last child of Invoice, after LineItems. To insert it as the first child of Invoice, simply change the statement to the following. SET @x.modify( insert 2002-06-15 as first into /Invoice[1] ) Here s an example of inserting an attribute, status= backorder , on the Invoiceelement. SET @x.modify( insert attribute status{ backorder } into /Invoice[1] ) Notice that this uses the constructor evaluation syntax (curly braces) to define the value of the attribute (backorder). You can also insert an entire series of elements using the insertstatement. For example, if you wanted to add a new LineItem, you would do the following. SET @x.modify( insert ( 154 20

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services

Bookmark the permalink.

Comments are closed.