Re: how to modify an xml field that may be plain text
- From: APA <buddy__a@xxxxxxxxxxx>
- Date: Wed, 14 Feb 2007 15:22:50 -0600
I'm not sure what you're asking. The update statement in a stored procedure and is actually designed to update any or all fields in the table.
EX:
update mytable
set field1 = coalesce(@field1, field1),
field2 = coalesce(@field2, field2),
....
where pkfield = @pkvalue
So in this construction it's difficult to update a field like this. In the case where the field is not using multiple types to identify different values of this field it would just use a normal field update syntax (i.e. field1 = @field1) however if the field is a xml fragment then it would need to be updated using the xml datatype's modify() DML method. It doesn't appear that there is any way to do an either-or type of update.
Michael Rys [MSFT] wrote:
What are the conditions for the value?.
Thanks
Michael
"APA" <buddy__a@xxxxxxxxxxx> wrote in message news:OTVYmpxTHHA.4956@xxxxxxxxxxxxxxxxxxxxxxxI have a field that is of xml datatype. The problem is that there are cases where the field is not an xml fragment but just a string.
Could be this:
<root>
<node type="1">sofsfnsdnfo</node>
<node type="2">ovhosdnosndv</node>
<node type="3">iudhviuvibeuw</node>
</root>
or it could just be this 'blah blah blah'.
So when updating this field it might need to update just one of the nodes or the entire field (in the case where it's a simple string).
Is there a way to handle both update types in one update statement?
Thx.
- Follow-Ups:
- Re: how to modify an xml field that may be plain text
- From: Michael Rys [MSFT]
- Re: how to modify an xml field that may be plain text
- References:
- how to modify an xml field that may be plain text
- From: APA
- Re: how to modify an xml field that may be plain text
- From: Michael Rys [MSFT]
- how to modify an xml field that may be plain text
- Prev by Date: Re: how to modify an xml field that may be plain text
- Next by Date: Re: Update XML from a view
- Previous by thread: Re: how to modify an xml field that may be plain text
- Next by thread: Re: how to modify an xml field that may be plain text
- Index(es):
Relevant Pages
|