views:

3091

answers:

1

I have a table:

MyTable
  config as XML
  title as varchar(255)

In MyTable.config I have XML in the following structure:

<configuration pagetitle="myConfig">
  <column>
    <row>
      <component id="1" type="MyPiece" title="My Title" text="junk" />
    </row>
  </column>
</configuration>

I need a script to inject the value of MyTable.text into the text attribute of the component node in my config XML.

I know this is wrong, but I want to do something similar:

UPDATE MyTable SET config.configuration.column.row.component.title = title
+1  A: 
UPDATE MyTable
   SET Config.modify('
   replace value of (/configuration/column/row/component/@title)[1]
    with sql:column("title")
   ')
Jason
Thanks Jason, that worked. ;)
Jason
I'm sure you're glad there was someone here who could help you. ;-) +1
Tomalak
I'm sure if it was Monday, when people are supposed to be working, there would have been more people to answer the question. :)
Jason