473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Update Query using XQuery

CK
UPDATE Sales.DeliverySchedule
SET DeliveryList.modify('declare namespace
df=http://schemas.adventure-works.com/DeliverySchedule;
replace value of (df:DeliveryList/df:Delivery/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



Nov 27 '06 #1
2 1223

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

Nov 27 '06 #2
CK
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

<ma******@hotmail.comwrote in message
news:11*********************@j44g2000cwa.googlegro 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

Nov 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Benjamin G. Jones | last post by:
I am having a very basic problem with XQuery. I want to use an XQuery API in Java (either Saxon or Qexo), and I have an XQuery expression that works as expeced from the command line if I specify...
1
by: dizzyhaze | last post by:
Here is a sample of the kind of XML I'm working with: <root> <elemt>Something is ro<lig>tt</lig>en in the state of <emph>Den</emph>mark</elemt> </root> I would like to be able to extract the...
1
by: FBS | last post by:
Hi everybody, I wonder if somebody could help me with this issue. I would like to rum some XQuery codes aginst my XML files and since I'm quite new in this area I'm not sure what to do. It is...
2
by: Alex | last post by:
Subject: Looking for an XML (database-based) Query Reporting Tool/advice First off, let me apologize if this thread is somewhat off topic... PLEASE REPLY TO: xml@solex-bi.com I am looking...
0
by: pepin_labulle | last post by:
I'm a newbie with XQuery and I'm trying to execute a query with Saxon. If I don't specify the XML source file name in the query, Saxon raises the following error :...
2
by: Daniel | last post by:
update/insert with microsoft.xml.xquery(.net2.0beta) can anyone provide an example of how to update/insert with microsoft.xml.xquery?
2
by: Ale | last post by:
Hi all! I need to build a middleware for XQuery: I mean a software receiving a std xquery and outputting the xquery result on "database.xml". This middleware must use 7 or 8 different choosable...
2
by: CK | last post by:
UPDATE Sales.DeliverySchedule SET DeliveryList.modify('declare namespace df=http://schemas.adventure-works.com/DeliverySchedule; replace value of (df:DeliveryList/df:Delivery/df:Address)' with...
30
by: Vadim Tropashko | last post by:
Reposting with more clarification (as Jan asked). Suppose I have a BNFgrammar and a source text parsed into a tree. How would I query an identifier declaration? All the XQuery tutorials...
4
by: kishjeff | last post by:
I'm still looking at this.. is this even possible? I'd like to search a set of xml files I want to skip all xml files that have a <clientelement that contains more than one <majortabelement, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.