Update Query using XQuery

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CK

    Update Query using XQuery

    UPDATE Sales.DeliveryS chedule
    SET DeliveryList.mo dify('declare namespace
    df=http://schemas.adventu re-works.com/DeliverySchedul e;
    replace value of (df:DeliveryLis t/df:Delivery/df:Address)[1]' with "7194
    Fourth St., Rockhampton"')
    WHERE Sales.DeliveryS chedule.Schedul eID = 1

    This query gives me the following error
    XQuery [Sales.DeliveryS chedule.Deliver yList.modify()]: Invalid source
    character 0x2019

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







  • markc600@hotmail.com

    #2
    Re: Update Query using XQuery


    Try this



    UPDATE Sales.DeliveryS chedule
    SET DeliveryList.mo dify('declare default element namespace
    "http://schemas.adventu re-works.com/DeliverySchedul e";
    replace value of (DeliveryList/Delivery/Address[1]/text())[1] with
    "7194 Fourth St., Rockhampton"')
    WHERE Sales.DeliveryS chedule.Schedul eID = 1

    Comment

    • CK

      #3
      Re: Update Query using XQuery

      I tried it and I get the same error. Any other ideas?
      *****I just tried this and it works great!!!

      UPDATE Sales.DeliveryS chedule
      SET DeliveryList.mo dify('declare default element namespace

      replace value of (DeliveryList/Delivery/Address[1])[1] with "7194 Fourth
      St., Rockhampton"')
      WHERE ScheduleID = 1

      <markc600@hotma il.comwrote in message
      news:1164662865 .592811.99820@j 44g2000cwa.goog legroups.com...
      >
      Try this
      >
      >
      >
      UPDATE Sales.DeliveryS chedule
      SET DeliveryList.mo dify('declare default element namespace
      "http://schemas.adventu re-works.com/DeliverySchedul e";
      replace value of (DeliveryList/Delivery/Address[1]/text())[1] with
      "7194 Fourth St., Rockhampton"')
      WHERE Sales.DeliveryS chedule.Schedul eID = 1
      >

      Comment

      Working...