473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

I am getting this error

1
When i am trying to execute,the following query using hibernate
select * from from user where (date(MONTH || '-' || '01'|| '-' || YEAR) between '2005-01-01' and '2009-01-01')

I am getting the error

No authorized routine named "DATE" of type "FUNCTION" having compatible arguments was found.
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.util.JDBCExceptionReporter An error occurred during implicit system action type "2". Information returned for the error includes SQLCODE "-440", SQLSTATE "42884" and message tokens "DATE|FUNCTION".
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.util.JDBCExceptionReporter An error occurred during implicit system action type "2". Information returned for the error includes SQLCODE "-440", SQLSTATE "42884" and message tokens "DATE|FUNCTION".

Can any body tell me how to resolve this issue , I am very new to DB2 database
thx in advance
jomin
Jan 29 '08 #1
3 8602
r035198x
13,262 8TB
When i am trying to execute,the following query using hibernate
select * from from user where (date(MONTH || '-' || '01'|| '-' || YEAR) between '2005-01-01' and '2009-01-01')

I am getting the error

No authorized routine named "DATE" of type "FUNCTION" having compatible arguments was found.
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.util.JDBCExceptionReporter An error occurred during implicit system action type "2". Information returned for the error includes SQLCODE "-440", SQLSTATE "42884" and message tokens "DATE|FUNCTION".
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.util.JDBCExceptionReporter An error occurred during implicit system action type "2". Information returned for the error includes SQLCODE "-440", SQLSTATE "42884" and message tokens "DATE|FUNCTION".

Can any body tell me how to resolve this issue , I am very new to DB2 database
thx in advance
jomin
That certainly looks wrong. What is the name of the column in the database containing the date?
Have a read at this nice article.
Jan 29 '08 #2
sakumar9
127 Expert 100+
The parameter that you are passing to DATE function doesn't seem to be correct:
date(MONTH || '-' || '01'|| '-' || YEAR)
please check again.

Thanks and Regards
----Sanjay
Jan 30 '08 #3
docdiesel
297 Expert 100+
Hi,

I assume that MONTH and YEAR are the columns in your table USER. The date is used by DB2 in ISO format by default, means YYYY-MM-DD. So you've got to concatenate the date string the following way:

Expand|Select|Wrap|Line Numbers
  1. select
  2.   *
  3. from
  4.   USER
  5. where
  6.   date(  YEAR || '-' || MONTH || '-' || '01'  )
  7.   between '2005-01-01'
  8.   and     '2009-01-01'
Regards,

Bernd
Jan 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
4
by: Pat | last post by:
In my Web.config i have :- <customErrors mode="On" defaultRedirect="genericerror.htm"> <error statusCode="404" redirect="pagenotfound.aspx"/> </customErrors to get page not found error but...
32
by: paul | last post by:
HI! I keep on getting this error and I have tried different things but I am not sure how to send the expiring date. The error that I am getting in Firefox 1.5 is "Error: expires.toGMTString is...
2
by: MSK | last post by:
Hi, Continued to my earlier post regaring "Breakpoints are not getting hit" , I have comeup with more input this time.. Kindly give me some idea. I am a newbie to .NET, recently I installed...
0
by: MSK | last post by:
Dear all, Continued to my earlier mail regarding "Breaking points are not getting hit in ASP.NET " , I got some idea from net. Can anyone give me more idea on this? Just to remind the issue:...
5
by: Rahul Babbar | last post by:
Hi, I am getting the error while trying to take a backup of the schema according to the backupschema.sql written at http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0602... ...
2
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following...
0
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
4
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.