JPQL How to ORDER BY UPPER ?

hi,
how can i do an order by upper/lower in JPQL? i am getting the below exception while trying to use this:
EJBException:javax.ejb.EJBException: EJB Exception: ; nested exceptio
n is:
<openjpa-1.1.0-r422266:657916 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Encountered "lower" at character 73, but expecte
d: ["AVG", "COUNT", "MAX", "MIN", "SUM", <IDENTIFIER>].
i am using the following namedquery
@NamedQuery(name="getProductbyType",query="SELECT t FROM ProductBean t WHERE t.productType = :productType order by lower(t.title)"),
thanks
Edited by: badguitarist on Feb 26, 2009 1:51 AM

What is your target database????
badguitarist wrote:
also am still getting the same error when i use ORDER BY ABS(t.title)ABS() is used for Integer Data type fields... and here i can understand that title field is a Varchar and it will
definitely fail.
I am able to execute the queries successfully in DB2 db.
I have even tried UPPER() in Order By clause and i got the result accordingly.......
Edited by: MPA2009 on Mar 2, 2009 3:04 AM

Similar Messages

  • Hi , I have just created an iphotobook and when i moved on to order it , it could be only shipped to Australia and U.S.As, I live in Greece do you have any idea of how to order it and deliver it in Athens, Greece ?

    Hi , I have just created an iphoto book but when I was about to order it , i realised that iphoto books can only be shipped to Australia and USA . Does anyone have any idea how to order and deliver the book in Athens , Greece ?????

    No 
    Here is a list of the countries supported for print products  --  http://store.apple.com/us/help/print_products/routing
    in teh past I have seen some people report that they were able to pick a nearby country and use their shipping address - I have not done this and have no idea what the results were
    LN

  • How to order the photos in a slideshow

    how to order the photos in a slideshow

    Just like for any other photo - select the photos in the album and use the command "File > Order Prints".
    Be careful, not to include any text slides. If it is difficult to select the photos in the slideshow, create a new album from the photos in the film strip (File > New Album).

  • How to order / group a report by a placeholder column ?

    How to order / group a report by a placeholder column populated by the group filter ?
    In more detail .....
    My Data model editor's select statement brings back (say 1000 rows) from the database.
    The group filter decides (on performing certain validations) whether to print a row or not in the report.
    Additionally the group filter calculates a "rule type" (just a rule number to say on basis of what rule, the row was selected)
    I would like to order/group the report on the placeholder column which was calculated by the group filter ?
    Obviously, I won't be able to add the "ORDER BY :CP_RULE_NUMBER" in the sql statement as the placeholer column cp_rule_number
    is determined by the group filter level only. (If I do, I get a frequency error)
    Any ideas ?
    Thanks in advance.
    Edited by: user553361 on 8/10/2008 17:35

    how is the group filter implemented?
    If its pure PL/SQL, what about putting the filter-procedure in a stored function into the database? Then you could use the group filter in your query.

  • How Production Order finish date and time is being comptued by SAP?

    Hello Expert,
    How Production Order finish date and time is being comptued by SAP? for example, we create a Production Order via CO01, the basic start date is 29.09.2008 and time is 04:00 it gives us basic finish date is 29.09.2008 and time is 13:28.
    how does SAP compute the time 13:28 as it finished time
    Please explain me briefly.
    Thanks
    Ryan

    Hello Guys,
    When we create Production Order in R/3 the time is calculated by routing but it is extended at SetUp machine time. It is not correct?. SetUp imachines time used only for first Production Order for the same product and it is plan manually, for others Production Order we need calculate time for production without SetUp machine time being pick up to compute finish time. how could we achieve this? only those Machine time will be check.
    thanks

  • How to search for upper/lower case using string using JAVA!!!?

    -I am trying to write a program that will examine each letter in the string and count how many time the upper-case letter 'E' appears, and how many times the lower-case letter 'e' appears.
    -I also have to use a JOptionPane.showMessageDialog() to tell the user how many upper and lower case e's were in the string.
    -This will be repeated until the user types the word "Stop". 
    please help if you can
    what i have so far:
    [code]
    public class Project0 {
    public static void main(String[] args) {
      String[] uppercase = {'E'};
      String[] lowercase = {'e'};
      String isOrIsNot, inputWord;
      while (true) {
       // This line asks the user for input by popping out a single window
       // with text input
       inputWord = JOptionPane.showInputDialog(null, "Please enter a sentence");
       if ( inputWord.equals("stop") )
        System.exit(0);
       // if the inputWord is contained within uppercase or
       // lowercase return true
       if (wordIsThere(inputWord, lowercase))
        isOrIsNot = "Number of lower case e's: ";
       if (wordIsThere(inputword, uppercase))
         isOrIsNot = "number of upper case e's: ";
       // Output to a JOptionPane window whether the word is on the list or not
       JOptionPane.showMessageDialog(null, "The word " + inputWord + " " + isOrIsNot + " on the list.");
    } //main
    public static boolean wordIsThere(String findMe, String[] theList) {
      for (int i=0; i<theList.length; ++i) {
       if (findMe.equals(theList[i])) return true;
      return false;
    } // wordIsThere
    } // class Lab4Program1
    [/code]

    So what is your question? Do you get any errors? If so, post them. What doesn't work?
    And crossposted: how to search for upper/lower case using string using JAVA!!!?

  • Very urgent :how I order by my report within the report option not change i

    Hi master
    Sir I design the report but I need my report order by cheq_no now my report order by voucher no but If I change in query then my format must be change that very problem for me I again design
    Is any option in report through which I order by my report as per my require column I is if I need on cheq_no , voucher_no or date
    Please give me idea how I order by my report within the report option not change in report query
    Thanking you
    aamir

    Use a lexical parameter (see online help):
    select ...
    order by &sort_parameter

  • [svn:fx-trunk] 11118: Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file .

    Revision: 11118
    Author:   [email protected]
    Date:     2009-10-23 16:35:38 -0700 (Fri, 23 Oct 2009)
    Log Message:
    Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file.
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: None; no functional changes
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.a s
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTex tBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

    Hi Rod,
    different sources (i.e. different branches) are mapped to different local folders in your workspace - in fact you cant map two different server folder to the same local folder.
    In you example the mapping would be (for example) like this:
    Server path                                                          
    local path
    $/../WpfHelloWorld                                                
    C:\Src\WpfHelloWorld
    $/../WpfHelloWorldDev                                           
    C:\Src\WpfHelloWorldDev             
    You can see your Workspace mappings when you select "Workspaces..." in the Workspace selection drop down:
    Within the "Manage Workspaces" dialog select your workspace and klick "Edit" to see and edit all you mappings.

  • Creative Zen - how to order playlis

    I just got the new creative zen but I can't figure out how to order the playlists. When I create a new one, it orders it alphabetically. In media explorer, if I drag/drop it to a new place, it doesn't fall into the new position, it adds all the songs from that playlist to the one I just dropped it on. It never "fits" in between the other playlists.

    "Because wma files take less space than mp3 files. "
    That is a myth. For lower bitratrate files, such as 6 kbps or 32 kbps, WMA files will sound a bit better than mp3 files at the same bitrate. Files at such low bitrates are typically lectures and podcasts, and not music. Music files are usually 28 kbps and up. At
    those bitrates, there is little quality difference between WMA and MP3 files at the same bitrate. WMA files do take more processor power to decode though, so expect shorter battery life when playing WMA files rather than mp3 files. Furthermore, recompressing files that are already compressed will result in lower sound quality. For example, if you have some mp3 files at 256 kbps and want them on your player at 60 kbps to save space, you should make the 60 kbps mp3 files from the CD, and not from the 256 kbps mp3 files if you want the 60 kbps mp3 files to be the best quality they can be.

  • Hi how to order iPhone 5 with delivery to Russia

    hi how to order iPhone 5 with delivery to Russia???

    The apple online stores don't ship outside of their own countries, so you will either need to use one of the premium resellers that is within Russia or find another online store that will ship overseas.

  • How production order create in MTS scenario

    hi
    Actually production order created based on Sales order,through MRP run(md02,04) , it will check the stock(avilability control), if it has less stock than sales it create the production order.
    Based on demand planning , we want to start the production ,so how production order created, we need to create directly CO01, OR  any process is there
    plz reply
    regards,
    sowmya

    Actually production order created based on Sales order,through MRP run(md02,04) , it will check the stock(avilability control), if it has less stock than sales it create the production order.
                I feel this is existing process of your client
    Based on demand planning , we want to start the production ,so how production order created, we need to create directly CO01, OR  any process is there
    1) If you want to consider both MTS and sale order in production then maintain strategy group 40 in MRP 3 view
    2) Create a PIR ( plan) in MD61
    3) Run a MRP in MD02/MD01
    4) As a result of MRP, you will get a plan order
    5) convert the plan order into production order in MD04

  • HT1338 Power Mac G5 have a Mac OS X 10.5.8 how I order Mavericks?

    Power Mac G5 have a Mac OS X 10.5.8 how I order Mavericks?

    A PowerMac G5 can't run 10.6 either.
    Allan

  • How to pull sales orders based on a Campaign??( I have created one Campaign and i need to know,for how many orders it was applicable)

    How to pull sales orders based on a Campaign ID??( I have created one Campaign and i need to know,for how many orders it was applicable)

    Hello,
    as far I understand you are talking about campaign determination. Once a sales order is generated having a campaign determined the campaign creates a reference to the sales order. The best way to track the assigned sales orders is using the related transactions function:
    The same feature is available for trade promotions as well.
    The data is available in table CRMD_BRELVONAE - you can also write a report selecting on OBJGUID_A_SEL with the campaign or TP guid and OBJTYPE_A_SEL with BUS2010020 for campaigns and BUS2010030 for trade promotions.
    Is this answering your questions?
    best regards,
    Johannes

  • How to order recovery disks

    i have hp g62-352ca laptop and i didnot have recovery disks so how to order to get recovery disks

    Prash.
    https://h10025.www1.hp.com/ewfrf/wc/mediaOrder?softwareitem=630247-121&cc=us&dlc=en&lc=en&os=4063&pr...
    REO
    HP Expert Tester "Now testing HP Pavilion 15t i3-4030U Win8.1, 6GB RAM and 750GB HDD"
    Loaner Program”HP Split 13 x2 13r010dx i3-4012Y Win8.1, 4GB RAM and 500GB Hybrid HDD”
    Microsoft Registered Refurbisher
    Registered Microsoft Partner
    Apple Certified Macintosh Technician Certification in progress.

  • How to order iphone 4 without contract on applestore website?

    How to order iphone 4 without contract on applestore website?
    When I choose iphone 4 16G Black, and applestore website ask me if I am AT&T wireless customer..I am not.
    How can I continue?

    QB_Gunslinger12 wrote:
    You'll have to order directly through ATT
    I assume he wants one not locked to AT&T, not only no contract. Any iPhone AT&T sells will be locked to AT&T.
    BUT .. you can buy unlocked iPhone 4 from Apple Canada:
    "Your new iPhone. Direct from Apple and ready to use.
    When you purchase your iPhone from the Apple Online Store, you’ll get it commitment-free. So you can sign up for service with the carrier of your choice and change your carrier at any time. Questions? Call our iPhone experts at 1-800-MY-APPLE."
    but I think this is only on line and likely must be shipped to a Canadian address.
    Phil

Maybe you are looking for

  • Newbie Question: What happens if I get a new PC?

    I just received a black video iPod for Christmas. So far, I've been able to buy, download and watch some TV shows and music from iTunes, and transfer some audio books from CDs and I love it. I have everything on a manual setting. The problem is my PC

  • HT201665 how do i import video from my iPad to my mac?

      my question is how do i import video from my iPad to my macair? <Personal Information Removed by Host>

  • Export with crystal reports as web service

    In order to create 3 tier architecture for security enhancments, I am using crystal feature to publish report as web service. As far displaying these reports on viewer is concerned, I have got that part working by setting the datasource to asmx and t

  • ORA-03113 error

    Hi anybody has have an ORA-03113 trying to connect from forms to a database? I am straying to test forms on the web and I have the following problem. I have done a test form and I deployed it. the form works with the EMP table in the SCOTT schema I h

  • Any way for iPhone backup to save apps?

    I wonder if there's any way to save my apps when i upgrade the iPhone software. The apps don't seem to be saved when i backup and then restore. Is there some aftermarket software for the iPhone that can do that? I'm running iTunes 9 and iPhone softwa