473,395 Members | 1,692 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,395 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 2533

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: Jonathan Patton | last post by:
Hi,=20 I have a query that runs in Microsoft Access against my mysql database = just fine. It is:=20 =20 UPDATE discussion_categories AS discussion_categories_1=20 INNER JOIN...
1
by: sivaram | last post by:
Hi all, I have the following query in Visual Foxpro that is throwing error. UPDATE T1 set T1.C2 = (select T2.C2 from T2 where T1.c1 = T2.C1)
4
by: Kannan s | last post by:
Dear Sir, Sub: help requred to build an Update Query using if or iif I am having two tables with the following fields I wish to create a single update query in MS Access Table1: code,...
1
by: Stout | last post by:
I have an inventory db that I use to catalog tapes. I am using a tab control with three tabs. One tab is for data entry and another tab is to view all tapes. My problem is that when I delete a...
2
by: midlothian | last post by:
Hello Trying to update a memo field in an update query using the Replace function, and am getting a type conversion error. Here is my parameter: CStr(Replace(CStr(),"$",Chr$(13) & Chr$(10))) ...
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...
0
by: nagar | last post by:
I'm using SQLite with the ADO.NET 2.0 SQLite Data Provider as the storage of my application. I chose to use an untyped dataset and I'm using a dataadapter to report changes to the DB. The query...
1
by: themightyrhino | last post by:
I'm writing a process to perform multiple updates on a main table from information stored in different component reports. As you can see from the below, I'm using a select query to base the update...
4
by: dawn123 | last post by:
I have two tables.. I want to update one table with the count of each colume from the pervious table. I have been able to do it using the query bulider and when ran, it works but I want to take the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.