MySQL Forums
Forum List  »  Connector/Node.js

Re: Separating return values.
Posted by: Roland Bouman
Date: March 14, 2006 05:54PM

Tommi Pisto wrote:
> So, in the last example (val5) two values were
> returned and those were separated using space
> character. What if one of those two values
> contains also space chracters. Is it impossible
> then to figure out how many hits there were?

No:

mysql> select ExtractValue('<a>ccc<b>ddd</b><b>eee</b></a>', 'count(//b)') matches;
+---------+
| matches |
+---------+
| 2 |
+---------+
1 row in set (0.00 sec)


> Now one would separate Value 1 and 2 from the
> result. How is that possible?
>
Ah! that won't be possible. I mean, of course, you can find spaces and do asubstring, but you cannot know if the space is a generated, 'separating' space, or if the space is part of the original content.

On the other hand, If you know your format, you can iterate through the distinct elements:

http://rpbouman.blogspot.com/2006/03/importing-xml-data-into-mysql-using.html

Options: ReplyQuote


Subject
Written By
Posted
March 11, 2006 10:37AM
Re: Separating return values.
March 14, 2006 05:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.