Advertisement

05.15.2008 at 12:48AM PDT, ID: 23404216 | Points: 500
[x]
Attachment Details

ORA-00932: inconsistent datatypes: expected %s got %s

Asked by Amit_Mudgal in Oracle Database, Java Programming Language

Tags: ORA-00932: inconsistent datatypes: expected %s got %s

Hi All,
        I have a problem while executing a query in my Java Code

i have a query like this (attached code)
I am trying to set values through a pprepared statement like below

pstmt = con.prepareStatement( GET_MESSAGES_LIST_IMW );
            
Float f = new Float( timeZone );
pstmt.setLong(1, f.longValue() );
pstmt.setString(2, clientID);
pstmt.setString(3, deviceID);

rs = pstmt.executeQuery();

on executing It gives me error saying " ORA-00932: inconsistent datatypes: expected %s got %s"

please tell me what can be done
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
"SELECT text, device.screen_name, type, status_code, " +
											"device.device_id device_id , to_char(record_time + (?)/24, 'hh:mi am') dispatch_time2, " +
											"cast(record_time as TIMESTAMP) rec_date, ( (sysdate - record_time) * 24 * 60) lapsed_time , " +
											"client_forms.name form_name,message.sequence_number sequence_number FROM message, client_forms, " +
											"device WHERE message.client_id = ? and message.device_id = ? " +
											"AND client_forms_id = client_forms.id(+) AND (type = 1 or type = 2 or type = 3) " +
											"AND device.device_id = message.device_id ORDER BY record_time desc ";
[+][-]05.15.2008 at 01:58AM PDT, ID: 21571633

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 03:15AM PDT, ID: 21571981

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 03:56AM PDT, ID: 21572201

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 04:05AM PDT, ID: 21572245

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 04:22AM PDT, ID: 21572340

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 04:58AM PDT, ID: 21572506

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628