Announcement Announcement Module
Collapse
No announcement yet.
any null check(NVL) function in HQL? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • any null check(NVL) function in HQL?

    Hi,

    I am using Hibernate3.0. I want to know how to use null check function(NVL). My DB is Oracle 10g.My dialect is "org.hibernate.OracleDialect".

    I am using named querys. If i use NVL function directly, when Null value is going for Long or Integer I got error like "can't assign Binary value to Integer".

    In search condition if i have three fields they may be null, Now i am writting eight querys for each possible condition.

    If any solution to this, It will reduce most of my comparing and query writting work.

    Pls Help

  • #2
    I don't think you can use this with HQL, you could use it if you were using native SQL. You might be better asking these questions on the Hibernate forum.
    http://www.hibernate.org/hib_docs/v3...ngle/#querysql

    Comment

    Working...
    X