Update XML tag

  • Hi,

    Can any one fix this "Incorrect use of the XML data type method 'modify'. A non-mutator method is expected in this context." error ?

    declare @VXML XML

    set @VXML ='<Msg601><IdMessaggio>087132000000102</IdMessaggio><Mittente>BMC</Mittente><IdSistemaGioco>1234567890</IdSistemaGioco><TotBet>0</TotBet><MotivoTrasmissione>0</MotivoTrasmissione><NumRigheB>0</NumRigheB><NumRigheC>15</NumRigheC><NumRigheD>0</NumRigheD><SommaAccantonata>0</SommaAccantonata></Msg601>'

    select @VXML .modify('replace value of (Msg601/IdMessaggio/text())[1] with 10')

    select @VXML

  • Please help us

  • change

    select @VXML.modify

    to

    set @VXML.modify

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • thanks lot

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply