Results 1 to 2 of 2
  1. #1
    Felissa is offline Member
    Join Date
    Jun 2007
    Posts
    95
    Rep Power
    0

    Default Native SQL in hibernate

    I must obtain the minimum value of a field of a table, don't know how can I do that with HQL I tried to use SQL, with the method createSQLQuery for Session, but it doesn't work.

    It throws an error saying that certain column does not exist, but the rare thing is that I never talk about that column. Do you know how can I resolve this?

    Felissa:p

  2. #2
    Marcus is offline Member
    Join Date
    Jun 2007
    Posts
    92
    Rep Power
    0

    Default

    Have you tried this?

    Java Code:
    sess.createQuery(select min(usu.sueldo) from Usuario usu))list.get(0)
    Greetings
    Marcus:cool:

Similar Threads

  1. Launch native app inside a JFrame???
    By benedums in forum Advanced Java
    Replies: 6
    Last Post: 02-25-2011, 03:23 PM
  2. Loading a library (for native methods)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-23-2007, 07:45 AM
  3. Defining a Native Method
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-23-2007, 07:44 AM
  4. Replies: 2
    Last Post: 06-30-2007, 03:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •