Questions tagged [xquery-update]

Xquery-Update is for problem scenarios related to Update queries using Xquery in SQL.

using Xquery you can manage XML data-type in SQL. MSDN reference Introduction to XQuery in SQL Server 2005

74 questions
10
votes
1 answer

Sql Xquery How to Replace text in Update Query

Table is named as MasterTable Columns ID type BIGINT, Name type VARCHAR(200) (stores xml type data for some reasons) Name contains data structured as SomeEnglishTextSomeItalicText When I need to Update the Master Table…
Harsh Baid
  • 7,199
  • 5
  • 48
  • 92
6
votes
1 answer

Insertion of an data in an XML using Basex

I am storing two XML documents, namely hospital and office, in BaseX. The following is the office xml: 666-66-6666
Sadesh Kumar N
  • 1,962
  • 7
  • 19
  • 26
4
votes
1 answer

XQuery Update: insert or replace depending if node exists not possible?

I am trying to build simple XML database (inside BaseX or eXist-db), but I have trouble figuring how to modify values in document : content is simple as this for test :

6>

I am trying to build something…
PetrV
  • 1,368
  • 2
  • 15
  • 30
4
votes
2 answers

how to replace the value of an attribute using xquery

I have an xml document as follows sony vijay I am trying to write an xquery to 1) find the user with the given userid - sony 2) change the value of the…
sony
  • 1,557
  • 10
  • 36
  • 50
4
votes
2 answers

How to convert text inside a node into child node using xquery update?

I have a xml document like First Level second level Third Level another second level How to convert…
Prakash Thapa
  • 1,285
  • 14
  • 27
3
votes
1 answer

How to return results together with update operations in BaseX?

I recognized that (insert/delete)-XQueries executed with the BaseX client always returning an empty string. I find this very confusing or unintuitive. Is there a way to find out if the query was "successful" without querying the database again (and…
Jan
  • 343
  • 2
  • 16
2
votes
1 answer

Fixing SQL Update using XQuery modify to work on SQL 2005

I'm trying to move a bunch of fields from a table into an xml blob contained within the same table. After this is successful I will be removing the column from the table. A really simple version (without the drop column) of what I've come up with is…
Tr1stan
  • 2,755
  • 1
  • 26
  • 45
2
votes
2 answers

Invoking an XQuery Updating function results in the error If any subexpression is updating, then all must be updating

My XML document contains a record of the movement of an object. The XML document consists of a series of observations. Each observation contains the lat/long location of the object, the lat/long of the observing sensor, and a date/time…
Roger Costello
  • 3,007
  • 1
  • 22
  • 43
2
votes
1 answer

Xquery to update value of a node of a xml stored in a column of a table

i use DB2 express-c edition v9.1 database management system. name of the table: student name of the column: course xml in the column: **101** **0** **102** …
Ajish
  • 21
  • 2
2
votes
1 answer

How to write an inquiry flwor xquery?

I have 5 cars, each car with 5 owners, I need to return those owners whose nation does not appear in the owners of other cars (can appear in the owners of the same car): 1 George Smith
Leon
  • 23
  • 2
2
votes
2 answers

Removing node using XQuery Update

I am trying to remove a child node from a parent node using xquery. Say, I have an entry shown below in my xml: 36 Engineering Village Author Tool 2009-09-30T12:55:42Z
sony
  • 1,557
  • 10
  • 36
  • 50
2
votes
1 answer

How to store XQuery results as new document in BaseX

I am very new to XML document database technologies, Xquery/Xpath and so on. So this is probably a very newbie question. Scenario: A number of XML documents as the input, want to run some number of transformations can be run on these XML documents…
barab157
  • 111
  • 1
  • 4
2
votes
3 answers

XQuery Update queries in BaseX are succesful, but no changes are written to the file

I am trying to use XQuery and BaseX to manage some files.xml as databases. I am using basexclient to send queries to basexserver. For example I have a simple file called library.xml like the following: gone with the wind
SagittariusA
  • 5,289
  • 15
  • 73
  • 127
2
votes
2 answers

Auto increment with XQuery Update?

Does XQuery Update support auto increment attributes, just like auto increment fields in SQL? I'm using BaseX as my database.
Kim Stebel
  • 41,826
  • 12
  • 125
  • 142
2
votes
1 answer

DBXML XQuery: move child to root of container

I am working with xquery updates in python and attempting to pull child elements out of the xml tree and insert them as new parent elements in the DBXML database. With the following xquery I was attempting to iterate each child and then insert the…
1
2 3 4 5