Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Update Query using XQuery

Reply
Thread Tools

Update Query using XQuery

 
 
CK
Guest
Posts: n/a
 
      11-27-2006
UPDATE Sales.DeliverySchedule
SET DeliveryList.modify('declare namespace
df=http://schemas.adventure-works.com/DeliverySchedule;
replace value of (dfeliveryList/dfelivery/df:Address)[1]' with "7194
Fourth St., Rockhampton"')
WHERE Sales.DeliverySchedule.ScheduleID = 1

This query gives me the following error
XQuery [Sales.DeliverySchedule.DeliveryList.modify()]: Invalid source
character 0x2019

Any ideas? What am I doing wrong here? Thanks for any advice.
TIA,
~CK







 
Reply With Quote
 
 
 
 
markc600@hotmail.com
Guest
Posts: n/a
 
      11-27-2006

Try this



UPDATE Sales.DeliverySchedule
SET DeliveryList.modify('declare default element namespace
"http://schemas.adventure-works.com/DeliverySchedule";
replace value of (DeliveryList/Delivery/Address[1]/text())[1] with
"7194 Fourth St., Rockhampton"')
WHERE Sales.DeliverySchedule.ScheduleID = 1

 
Reply With Quote
 
 
 
 
CK
Guest
Posts: n/a
 
      11-27-2006
I tried it and I get the same error. Any other ideas?
*****I just tried this and it works great!!!

UPDATE Sales.DeliverySchedule
SET DeliveryList.modify('declare default element namespace
http://schemas.adventure-works.com/DeliverySchedule;
replace value of (DeliveryList/Delivery/Address[1])[1] with "7194 Fourth
St., Rockhampton"')
WHERE ScheduleID = 1

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>
> Try this
>
>
>
> UPDATE Sales.DeliverySchedule
> SET DeliveryList.modify('declare default element namespace
> "http://schemas.adventure-works.com/DeliverySchedule";
> replace value of (DeliveryList/Delivery/Address[1]/text())[1] with
> "7194 Fourth St., Rockhampton"')
> WHERE Sales.DeliverySchedule.ScheduleID = 1
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XQUERY UPDATE with SAXON9 -sa RolfK XML 1 12-20-2008 12:35 PM
Performance of datatable.select() func against database query orthe xquery Mukesh ASP .Net 2 06-14-2007 07:03 AM
[announce] DataDirect Technologies to Present on Upcoming XQuery Update facilities at Extreme Markup Languages 2005 Conference JamesLee72@gmail.com XML 0 08-03-2005 01:48 AM
Saxon and XQuery : how not to repeat the XML source file name in the query ? pepin_labulle@yahoo.fr XML 0 07-04-2005 08:57 AM
XQuery ( XML Query ) FBS XML 1 06-08-2005 01:56 PM



Advertisments