[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

return only latest version of an item

A. Steven Anderson steve at asanderson.com
Thu May 14 19:14:00 PDT 2009


  return only latest version of an item
>
> I thought Pavel's suggestion was just fine and, indeed, the result is more
> than one item (transcript below).


Something must be lost in my translation from my real data to this
simplified example, because it definitely doesn't work with my real data.  I
only get 1 result.


> Find another processor?
>

I'm not sure which processor exist-db 1.2.5 is using out of the box and if
it can be swapped.


> BTW, your data set happens to have steadily increasing version values for
> each <id>.  If it is true that the last of each <id> has the highest
> version, this might execute even faster because it has no function call:
>
>  /items/item[not(id=following-sibling::item[1]/id)]
>

Thanks, but the real data isn't guaranteed to be in this order.  It was just
a simplified example.

Thanks for the responses though!

-- 
A. Steven Anderson
Independent Consultant
http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090514/0338713b/attachment.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.