Here is sql-query:

select t1.id, t1.rep_id1, t1.rep_id2, t1.proc_name, t1.proc_result, t1.descr from cnfl_szd_rep_add t1, (select min(id) rep_id1, max(id) rep_id2 from cnfl_implement_rep where trunc(report_date)=trunc(:p_date)) t2 where t1.rep_id1=t2.rep_id1 and t1.rep_id2=t2.rep_id2

Here is structure of the table cnfl_implement_rep:

create table CNFL_IMPLEMENT_REP ( id NUMBER not null, insert_date DATE, report_date DATE, staff_id NUMBER, app_ver NUMBER, staff_begin DATE, staff_end DATE, day_night VARCHAR2(10), tsa_info CLOB, rep_gbr CLOB, is_deleted INTEGER default 0);

Here is structure of the table cnfl_szd_rep_add:

create table CNFL_SZD_REP_ADD ( id NUMBER not null, rep_id1 NUMBER, rep_id2 NUMBER, proc_name VARCHAR2(4000), proc_result VARCHAR2(4000), descr VARCHAR2(4000));

I have created datasource definition, have chosen that it is based on Query, have created bind variable p_date with domain DefaultDate and I get error message 'ORA-00932: inconsistent datatypes: expected DATE got NUMBER' when I press OK button to save the datasource definition.

Why do I get such error message?

asked 04 Dec, 11:39

Andrey's gravatar image

Andrey
133
accept rate: 0%


This is a typical error that occurs when you have an api call like

api_datasource.getColumnValueNR('DataSource.Field')

and the field type does not correspond with that NR (number) from getColumnValueNR. It shoud be getColumnValueDT if the field type is DATE, getColumnValueTX if the fied type is VARCHAR2 and getColumnValueNR if the field type is NUMBER.

Hope this helped.

Cezar

link

answered 10 hours ago

brg's gravatar image

brg
2115
accept rate: 0%

edited 10 hours ago

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×67

Asked: 04 Dec, 11:39

Seen: 26 times

Last updated: 10 hours ago


© Copyright Gerger 2017