473,786 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I am getting this error

1 New Member
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.u til.JDBCExcepti onReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.u til.JDBCExcepti onReporter 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.u til.JDBCExcepti onReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.u til.JDBCExcepti onReporter 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 8751
r035198x
13,262 MVP
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.u til.JDBCExcepti onReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.u til.JDBCExcepti onReporter 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.u til.JDBCExcepti onReporter SQL Error: -727, SQLState: 56098
[1/29/08 8:13:51:453 EST] 28dd20a3 JDBCException E org.hibernate.u til.JDBCExcepti onReporter 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 Recognized Expert New Member
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 Recognized Expert Contributor
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
2973
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 it. Simple database: I want to have a user enter Supply Orders (just for tracking purposes) by Item. The user may also enter a new item - "new" is a combination of Item, PartNumber and Vendor - they could have the
8
10016
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 the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
4
13624
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 instead i keep getting a RUN TIME error below: Any ideas.. Runtime Error
32
5023
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 not a function" ---------------------------------------------------- I have this in a .js file and in the head section.
2
4222
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 .NET. I could not debug using breakpoints, breakpoints are not getting hit, but the application is working fine with out any issue.
0
1397
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: 1. I got the following error while executing a newly created a web application (just sample app)
5
3888
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... db2 =CALL ADMIN.BACKUPSCHEMA('PKMSQA','/u01/Backup_schema') SQL0438N Application raised error with diagnostic text: "EXPORT raised error". SQLSTATE=78000
2
3087
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 errors 1.Error 6 Cannot implicitly convert type 'mscomctl.Toolbar ' to 'mscomctl.Toolbar . An explicit conversion exists (are you missing a
0
2923
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 action="/login"> <html:text property="userName" value="Bunty"/> <html:submit/>
4
5730
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, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the company, but when he built the code he used MSVC++, and though I am not certain of the version he was ...
0
9496
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9961
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.