Home > Archive > MS SQL XML > September 2005 > Re: Error on xml.modify(...) to insert a new node in existing valu









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Error on xml.modify(...) to insert a new node in existing valu
Brice Prunier

2005-09-22, 3:23 am

It works.....

Thanks to both of you :
-Kent for the good answer.
-Han for the good technical advise.


> Kent's xpath should return singleton or empty sequence always/wherever.
>
> Xpath like
>
> (/any-xpath)[1]
>
> is statically a singleton or empty sequence. It just means that search the
> first node satisfying the condition in the whole document.
>
> On the other hand,
>
> /any-xapth[1]
>
> just searches the node not having any preceding-sibling. Number of such
> nodes can be more than one.
>
> Example,
>
> declare @x xml
> set @x='<a><b><c/></b><b><c/></b></a>'
>
> select @x.query('count((/a/b/c)[1]), count(/a/b/c[1])')
>
> --
> Pohwan Han. Seoul. Have a nice day.
> "Kent Tegels" <ktegels@develop.com> wrote in message
> news:bc59bc32a69b8c7
8c8e1cffb675@news.microsoft.com...
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com