Does xqj suport sort(order by )function

hi Geoff
I just use xqj to do some test.But I face some problems.Can u give me some advices.
Indeed I want to sort a xml file like sql did by order by,and I read the xquery Specification and I know it suports this fuction.But it seems that xqj does not suport this fuction.
First I run the demo coming up with RELEASE_0.2_030217 that I downloaded from oracle.com
I do like this:
Edit the exmpl1.xql
<bib>
FOR $b IN document("bib.xml")//book
RETURN
<book >
{ $b/@year }
{ $b/title }
</book>
</bib>
run the file and it gives the results I want.
D:\xml\xq>java oracle.xquery.XQLPlus exmpl1.xql
XQuery Command Line Tool
Version 1.0
Enter XQuery statements followed by /;
Result
<bib>
<book year="1994">
<title>TCP/IP Illustrated</title>
</book>
<book year="1992">
<title>Advanced Programming in the Unix environment</title>
</book>
<book year="2000">
<title>Data on the Web</title>
</book>
<book year="1999">
<title>The Economics of Technology and Content for Digital TV</title>
</book>
</bib>
But when I do some change like this :
<bib>
FOR $b IN document("bib.xml")//book
order by $b/title
RETURN
<book >
{ $b/@year }
{ $b/title }
</book>
</bib>
I run the file and it gives me some errors:
D:\xml\xq>java oracle.xquery.XQLPlus exmpl1.xql
XQuery Command Line Tool
Version 1.0
Enter XQuery statements followed by /;
XQE: error in executing the XQuery statement:
'<bib>
FOR $b IN document("bib.xml")//book
order by $b/title
RETURN
<book >
{ $b/@year }
{ $b/title }
</book>
</bib>
XQE: Parsing failed 'Encountered "order" at line 5, column 7.
Was expecting one of:
<Or> ...
<And> ...
<Div> ...
<Mod> ...
<Return> ...
<To> ...
<Where> ...
<Intersect> ...
<Union> ...
<Except> ...
<Before> ...
<After> ...
<Instanceof> ...
<Sortby> ...
"=" ...
"==" ...
"!=" ...
"!==" ...
"<=" ...
">=" ...
<ValueComparisonEQ> ...
<ValueComparisonNE> ...
<ValueComparisonLT> ...
<ValueComparisonLE> ...
<ValueComparisonGT> ...
<ValueComparisonGE> ...
<OrderComparisonPrecedes> ...
<OrderComparisonFollows> ...
"<<" ...
">>" ...
<NodeComparisonIs> ...
<NodeComparisonIsNot> ...
"<" ...
">" ...
"+" ...
"|" ...
<For> ...
<Let> ...
<Stable> ...
It seems that xqj does not suport sort fuction.
Do I miss something?
can you help me?
thanks!

Hallow,
The 'order by' clause will be properly supported in the future production release of XQuery from Oracle.
Regards,
Geoff

Similar Messages

  • Sort Order Not working in LR 3

    I cannot get sort order to function correctly in Library Mode. When I make it "User Order" it still put them in some seemingly random order and won't let me drag and drop images into a new order. I drag them to a location and it places them in a completely different random location.
    Is this a bug, is this normal, what am I missing? Seems like incredibly basic functionality.
    FYI, this particular set is all virtual copies not original images. it is a set of "treated" virtual copies and has 526 images in it.
    Driving me crazy and need solution. Help!
    Thanks!

    Yeah, it is a collection within a collection set. I just upgraded from 3.0 to 3.3 and it seems to have fixed it. Was weird that a bug like that could make it to version 3.2 before being fixed but as long as it's fixed now.
    Wouldn't happen in collections with much less images, was only happening in the one with 500+ and they were all virtual copies. Not sure if that had anything to do with it but figured I'd add the info here in case anyone else has problems.

  • Sort order of photos on iPhone messed up when photos stored on a NAS

    Sorting iPhone photos stored on a netfear readyNAS Duo under windows
    I have a set of photos taken with another camera which I sync to my iPhone 3 GS.  Previously I stored the photos on my windows pc and after syncing they were sorted on my iPhone  alphabetically.
    I then deleted the photos from my iPhone, deleted the iPod cache folder that was in the photo directory on my windows pc, and copied them over to my readyNAS duo.  The NAS ( network attached storage) is acessed over wired Ethernet via CIFS.  
    I then reimported the photos using iTunes, (which created a new cache folder on the NAS) and synced them back to my phone.  After doing this, the sort order for those photos on the phone seems scrambled.
    One other thing to note.  Previously the folder synced contained the photos.  Now the folder containing the photos is a subdirectory of the sync folder
    Now, I followed another post in this forum whereby the user, storing his photos on his windows pc, deleted his cache folder, resorted the photos via windows explorer, and imported them back in.  This solved his problem.  
    I tried these steps with the photos on the NAS and this did not work for me.
    Any ideas on how to keep my photos on the NAS and have them sorted properly on the iPhone?
    Brad

    I use iPhoto for photo storage on my Mac, and the photo placement/order in my iPhoto albums that I transfer to my iPhone match the photo placement/order with the albums in iPhoto.

  • Designerd does not generate Order BY code for Sort Order on a lookup tabel column.

    I am setting the Sort Order on a column which is based on a lookup table.
    When generate the the module, designer does not generate the code for the Sort Order that I set on the lookup table column.
    Is there a work around for this problem or is there some thing else that needs to be done in designer to make it generate the order by clause?
    I will very much appreciate help.
    Regards
    Prasad.

    A bound lookup item, will be generated as a NON-database item in Forms. Designer generates an ORDER BY CLAUSE (a Forms Block property) for the ordering. But a NON-database item cannot be included in the ORDER BY CLAUSE.
    I used a stored function for ordering the lookup item.
    Best regards
    Harm van Zoest

  • Sort order issue in with Evaluate function ( Next Quarter measure)

    Hi All,
    I have report requirement where I have to show measures for a particular geography for previous, current and next quarters in a pivotal view.
    ---------------Previous Quarter| Current Quarter|     Next Quarter
    Geography               
    ABC|xx|xx|xx
    PQR|xx|xx|xx
    XYZ|xx|xx|xx
    Next quarter values are displayed for other geography like
    ABC value is shown for XYZ and XYZ value is shown for PQR
    I have derived measure for pervious quarter using Time Series Function > Ago function,
    However the problem is with next quarter. I used following Evaluate Function to derive measure for next quarter.
    EVALUATE ('LEAD(%1,1) over (order by %2)' AS DOUBLE PRECISION , X, Y)
    Here X = Measure and Y = Level (Quarter)
    X is delta of two other measures A and B.
    X = (A- B)
    Thanks,
    SMA

    Hi user10300020,
    That's a fairly common problem with months that happens regardless of database source.
    In the logical layer of OBIEE you can specify the sort order on the month name column. Just double click on the month name column and look for the option to set sort order based on a different column. I typically sort the month name based on the month number.
    Give that a shot and tell me if it works.
    -Joe

  • Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?

    Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?

    Did anyone find a good way to sort the shared albums better, so that the ones you share with can better find their way around.
    You can arrange them manually in an album, select all and use the Photos ➙ Batch Change ➙ Date to menu option and check the box to add a set interval between photos. That will let the photos be sorted by date and be in the order you want:
    OT

  • HT2470 Why does this not explain how to change the sort order?

    Why does this (i.e. support at Apple.com) not explain how to change the sort order? I can "arrange" by Date Modified for example but it won't let me switch to use most recent dates first. Also, what is Apple-speak for arrange versus sort anyway? It seems I used to be able to click on a column heading in finder and get a drop down arrow allowing me to change the sort sequence.

    Arrange roughly translates to "group the items in the folder." Sort is how each group is ordered. If you have arrange set to none, you can sort by anything. However, there is no way in the Arrange/Sort menu to choose the direction. The only way to do that is in the List View, and you must have Arrangement set to None.
    I've submitted an Enhancement Request to allow choosing sort direction from the Arrange/Sort menu, but I haven't ever gotten a response, which is good and bad. Good because they will often respond that they have considered it and don't plan on implementing. Bad in that they've haven't implemented it.

  • 'Sort order column' doesn't work for prompt with function

    I turned on the 'sort order column property' in repository for a logic column 'school year', so when I get school year from prompt, it shows desc order. It works fine if th colume in prompt is a simple prompt. But when I add function in the column in prompt (means edit Fx with a case statement), when school year prompt shows in dashboard, it is not sorted in desc order any more, it went back to acs.
    Am I missing something, or this is a bug?
    Another question, when I turn on 'sort order column property' in repository for a logic column, can I choose to desc on another column? I couldn't do it, and had to create another sorting column.
    Thanks,
    Amy

    Cant you create this logic in the rpd and then apply order there and use the newly created column in your prompt..

  • Reminders-sort order of tasks does not sync

    I'm trying to use Reminders on my iPhone 4s, iMac running Mountain Lion and iCloud. Although syncing does occur BETWEEN THESE 3 APPS,
    THE SORT ORDER OF THE TASKS IS COMPLETELY OUT OF SYNC. I need to sort my many to do tasks manually as priorities change
    daily. Therefore it's important to have the sort order (sequence of task items) sync across these devices. I imagine many users would agree with this.

    Just discovering for myself that re-ordering reminders can be achieved - but order is not synced between devices or shared accounts. Which is to say it's about as much use as a chocolate teapot.
    For the record, I have thrown the equivalent of a message in a bottle to feedback - an action for which I believe the acronym is CWOT.
    Also, it seems there's a thing called customer quality feedback...
    Visit our Customer Quality Feedback (CQF) site at: http://www.cqf.apple.com/
    However, it doesn't work...
    Alas, it seems the writing is on the wall for Apple.

  • Changing sort order in iTunes does not change order on iPad

    If you create a new playlist (not a smart playlist) in iTunes, you can get the songs to order according to the track number or the name of the song or the size etc. It used to be that this selected sort order would be reflected in the corresponding playlists on the iPhone/iPad
    This doesn't seem to work using iTunes 10.6, iTunes Match and iOS 5.1 on my iPad 2.
    1. I create a new playlist in iTunes and name it Test.
    2. I sort this playlist by the Name column, so that the songs are in the A to Z order (Fernando, SOS, Waterloo)
    3. The new playlist appears on my iPad.
    4. The iPad playlist lists the songs in the order selected in iTunes.
    Now, back in iTunes, I click on the Name column again, so the names are now sorted in reverse. That is, from Z to A (Waterloo, SOS, Fernando). I also rename the playlist to Test 2 so that I know that the same playlist has been updated on my iPad.
    So the playlist Test 2 is now ordered by the song name from Z to A in iTunes. However, the playlist on the iPad does NOT reflect the new sort order. It is still ordered A to Z, not Z to A as I expected.
    5. Now I create a new playlist named Test 3. I open Test 2 (still in the order Z to A) and copy the songs to Test 3.
    6. The new playlist named Test 3 appears on the iPad.
    7. The songs are in the correct order.
    8. Change the order again in the playlist.
    9. The change in the order is NOT reflected on the iPad.
    Grrr. I quit the Music app (including the background process on the iPad) and launch it again. But the order of the songs in Test 2 is still not the same as in iTunes.
    Totally frustrated, I do the following:
    1. Quit all apps running in the background on the iPad.
    2. Go to Settings and turn off iTunes Match.
    3. Log out of the iTunes store.
    4. Restart my iPad so that the playlists disappear from my Music app.
    5. Turn iTunes Match back on.
    6. Log back into the Store.
    7. Wait for the iCloud to sync.
    8. Playlist Test 2 is still in the incorrect order! This is unbelievable.
    I have tried the Right-Click 'Copy to Play Order' trick that I read about in another post but it doesn't help.
    Is anyone else experiencing this problem? Any solutions?
    Thanks in advance.

    This isn't an issue of putting songs on that I don't want, it's that it doesn't CHANGE my music, even when I try to make it change.  I've got over 15000 songs in my iTunes; my iPod can only hold around 275 songs.  My problem, is that I can't make it "randomly" choose different songs.  when I try to change the music, it puts the same songs on over and over.
    Emphasis here is on RANDOM: I do not want to have to select the music to put on my shuffle. and
    CHANGE: If I only wanted to listen to the same 275 songs, I wouldn't have bothered purchasing the others...

  • Image Sort order changes when doing an editing in PS or Portraiture.

    LR 5.7  OSX 10.9. Sometimes when doing an edit in PS and/or Portraiture the tiff and the raw file move to the end of the Loupe view. The first 15 images I worked on today stayed in the order they were shot, by file name,with the tiff and raw file next to each other.  then for some reason the 16th one moved to the end of the Loupe view image lineup when the edit in was selected and the tiff file was created. How do I change the sort order back to file name or make this stop happening altogether.

    V, thanks for the reply.  I did know that but the problem was that even though the new version was created it did not open in CS4. This left the version locked in the Organiser with know way of closing it.
    However, a re-boot of the machine seems to have cured this.
    Colin

  • Java FX linechart reloading does not load the category axis in sorted order

    We are reloading the different data in Java FX line chart for . First time it loads with sorted order and looks good but we try to reload again and again the category axis sorting messed up and does not display in order. I did try even with Number axis but no luck.
    Any pointers why the first time able to load but not later....
    I am removing the series and recreating the series instance before loading the chart but no luck.
    lineChart.getData().removeAll(series1)
    Appreciate for any pointers.

    Please supply an executable sample

  • Lightroom Mobile does not recognise my custom sort order

    I cannot find a way to get the Lightroom Mobile app on my iPad to recognise the custom sort order set up for the collection on my desktop. I am on the current versions of both Lightroom and Lightroom Mobile. The only sort option that appears in LR mobile is by capture time. The custom sort order is available as an option for the collection on the Abobe website but not on the mobile app.

    You can change the sort type when you touch the Capture Type-label. So tab on the "Capture Time"-label and you will see the other sort options like "Modified Date", "Custom Order" etc.
    Hope that helps.
    -guido

  • What sort order does address book use?

    I'm trying to be able to sort things "after" the alphabet in a standard address book "sort by name" sort order. So aA to zZ then other stuff. In a standard ASCII sort, ~ would work - but that's been changed in Thunderbird.
    So far I've been trying to find out what comes after "Z" in the sort order, but have been unable to do so.
    It's not following ANY standard sort order that I've been able to determine.
    It's sorting 0xF7 (÷) in front of 0x5A (Z). It's even sorting Unicode U+FEFC *before* U+005A in an "ascending" order??
    Was the standard sort order hacked so that anything that isn't alphabetical comes first, which means that if I want to have something sort after "Z" I HAVE to use zz or zzz instead of what works in every other program I use? Even ~ sorts before the alphabet, yet even in standard ASCII it sorts after.
    Anyone know of an add-on that fixes this "helpful" hack and gives me a predictable, dependable, and above all documented sort order?

    I think my only comment at this point can be "my, that escalated quickly!!".
    Thanks for the pointers and information. Unfortunately, I'm now lost in too much mostly incomprehensible information. However, the tr03.pdf doc you provided I think had the answer.
    If I understand it correctly, this (new to me) sorting mechanism means that nothing comes after Z any more? (based on the PDF file you gave me, part 3.0 intro, order of characters). Is that correct?
    Actually, I think I'd consider this "solved", or at least "answered".
    Thank you.

  • Bridge does not keep the manual sort order

    I've tried everything I know but I cannot get Bridge to keep the manual sort order (iMac, 10.6, CS4). What is the file responsible for keeping the sort order? Perhaps removing it would help. This is really frustrating. It would be so important to keep related pictures together for estimating all the aspects.

    This is action script 3.0 Flash CS3
    Below is what I receive back after I test it but it is not in
    order. I guess I assumed that if the tab order is correct and the
    are layout in that order and the code in the form is in order it
    would come back the same way. Mostly I am trying to narrow down the
    problem and my guess is the cgi script or am I wrong? I have
    attached the code for the form.
    Thank You for you time
    Form email submission results:
    Below is what you submitted on Tuesday, February 19, 2008 at
    10:35:08
    list:
    phone:
    address:
    comments:
    city:
    state:
    zip:
    name:

Maybe you are looking for