File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
How to upper cast the average in db2 query?
Joined: Nov 26, 2008
Apr 07, 2009 01:00:11
Below is the query :
i am getting SQL0802N Arithmetic overflow or other arithmetic exception occurred. SQLSTATE=22003 error in the below query for avg calculation.
The DUR_MILLISCNDS_CNT is integer.
Can Upper casting the average solve the error. How to upper Cast average.
Can you please help me in this.
sQuery="SELECT " +"Count(*) As DAILY_VOLUME, " +
"AVG( DUR_MILLISCNDS_CNT) AVERAGE_RESPONSE_TIME, " +
---- error occured----
"MIN ( DUR_MILLISCNDS_CNT) MINIMUM_RESPONSE_TIME, " +
"MAX ( DUR_MILLISCNDS_CNT) MAXIMUM_RESPONSE_TIME " +
"FROM " + dbName + ".TCAOP_MTRCS " +
"WHERE DATE( SESS_TS ) BETWEEN '" + fromDate + "' AND '" + toDate + "' " +
"AND RQST_DSCR ='" + componentList.get(i) +"' with ur";
// System.out.println("QRY === " + sQuery);
volume = rs.getLong(1);
Jesper de Jong
Joined: Aug 16, 2005
Apr 07, 2009 01:50:38
aypa, please check your private messages for an important administrative matter.
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 7 API documentation
- My blog about Scala
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: How to upper cast the average in db2 query?
Urgent Help in Query
Doubt in Sun's sample question
Oracle XMLType data size
Help in Query
List of Database in J2ME
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013