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
0
votes
1 answer

how to sum all of the count items in xquery

My problem is i want to display the count of all genre that is equals to actions `
0
votes
3 answers

SQL update query not updating table data

Here is my code and it shows successful but it does not update row in table. cm = new SqlCommand("update table_products set pname = @pname, pdesc = @pdesc, bid = @bid, cid = @cid, cost = @cost, price = @price, reorder = @reorder where pcode like…
hot spot
  • 19
  • 1
  • 8
0
votes
0 answers

No updating expression error while updating databse (BaseX)

I am using BaseX version 8.6.6 i am getting the error " expression must all be updating or return empty sequence" while updating database below is the code: declare %private %updating function local:ingest-job() { let $contentpath :=…
Manish Joisar
  • 1,256
  • 3
  • 23
  • 47
0
votes
1 answer

xquery "Content for update is empty"

This is the first time I've run into the Xquery (3.1) error Content for update is empty and a search on Google returns nothing useful. If I run this simple query to identify nested /tei:p/tei:p: for $x in $mycollection//tei:p/tei:p return $x I get…
jbrehr
  • 775
  • 6
  • 19
0
votes
1 answer

How to update oracle XML datatype in table through Xquery

While updating oracle xml data in table am getting below error. SQL Error: ORA-18126: XUDY0027 - Invalid target expression 18126. 00000 - "XUDY0027 - Invalid target expression" *Cause: Target expression of an INSERT, REPLACE, or RENAME…
Mahesh
  • 198
  • 2
  • 16
0
votes
1 answer

error in Xquery update ( eXistdb)

when i am trying toupdate data into database i found following error'XQuery update expressions can not be applied to in-memory nodes.'...how to resolve this anyone help me....
0
votes
1 answer

How to output XML node with same name[multiple occurrences] using an XQuery

My XML Response Load appears as below 1 100 200 300 Here 'entries' is…
Tom George
  • 29
  • 1
  • 1
  • 7
0
votes
1 answer

BaseX: Trying to move elements between namespaces in XQuery Update Facility

I would like to normalize XSD input file to put xs: before any XSD elements without xs: prepended with XQuery. copy $c:=doc("test.xsd") modify ( if($c/schema) then ( for $item in $c//* where substring($item/text(), 1, 3) != "xs:" …
JACK M
  • 2,627
  • 3
  • 25
  • 43
0
votes
1 answer

calling XQuery Update from the command line after update to oXygen 17.1

We have for the past year been running a batch script I wrote to call a series of XQuery Updates from the Windows command line using Saxon. It worked fine while we were on oXygen 16, but after all the machines in our department were upgraded to…
0
votes
2 answers

How to output some XML optional elements/nodes always using XQUERY

I have a requirement where I need to output optional XML elements always (irrespective of data availability) , while writing into a .csv file. XML File Format 123
Tom George
  • 29
  • 1
  • 1
  • 7
0
votes
1 answer

XQuery Replace Value With Conditional Failing

i am in the middle of creating xquery replace-value of node action in XQuery. But seems this code is not working therefore the IF-ELSE statement is always going to else. This is my code: declare function local:replacing($contextData as element())…
randytan
  • 1,029
  • 5
  • 23
  • 52
0
votes
0 answers

How to use Update and Insert Value XQuery in PHP

I am using XML based database to save the records of large scale data in my web application. I know how to fetch all the data or specific data through XML tags in PHP. But I have no idea how I can update the data stored in XML tags using PHP. For…
Formanite
  • 1
  • 1
0
votes
1 answer

how to I add where clause or constraint to my xquery

I have been given a station in london - warren street station, euston, and i have to return the stations which have the same bike availability as warren street station and at least as many empty docs. I have written a small query to return warren…
Emma
  • 1
0
votes
1 answer

Update XML file with XQuery Issue

I am trying to update a node in an XML file using the following XQuery (in eXide): xquery version "3.0"; let $update := doc('db/apps/xmlFiles/Customers.xml')//Customers[ID = 6] return replace value of node $update/LastName with 'Morris' but I…
Lloyd
  • 435
  • 3
  • 12
  • 29