java - dateadd function is not working in Hibbernate -


I want to get data from my database in the past day and for this, I added a DATE_ADD function Is using mysql database in my hibernate query, but I am having an error running the query and here is the query:

  Select the column name from tabname, where column name = DATE_ADD ( Day, -1, receptive)  

Call the function Sir If your function is a string or varchar value .

session.createSQLQuery (select "my_fn: param1)")

Where my_fn parameter param1 Is the name of your function with.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -