Exception: DBD, ORA-00932: inconsistent datatypes

I have 2 date prompts in the report. After i input the dates, it’s giving me this error message.

Connection or SQL sentence error: (DA0005)
Exception: DBD, ORA-00932: inconsistent datatypes: expected DATE got NUMBER State: N/A

I have checked the related object in the universe. It is of type: date.
This same report was running fine untill yesterday.

Can anyone help me!


bodev2007 (BOB member since 2007-10-29)

Hi,
It will be nice if you put the code here.
To accept the dates which prompt type are you using is it @variable or is it @prompt.


Omkar Paranjpe :us: (BOB member since 2006-02-13)

Hi,

I am facing similar issue with one of my conditional object in XI R2.

The object definitaion is as below,

@Select(Working Day Calendar\Date Value) = (case when @Prompt(‘Select Reporting Date’,‘D’,mono,free,Not_Persistent,USER:51) = ‘10-10-2010 00:00:00’
then sysdate
else @Prompt(‘Select Reporting Date’,‘D’,mono,free,Not_Persistent,USER:51)
end)

While parsing this object, I am getting error message as
“Parse failed: Exception: DBD, ORA-00932: inconsistent datatypes: expected DATE got CHAR. State: N/A”

Date Value object is of datatype Date.
Instead of sysdate if I put any other date, it is working fine. The database I am using is Oracle 10G.

I am not able to understand where I am making mistake :hb:

Any help in this regard will be greatly appriciated.


aniketp :uk: (BOB member since 2007-10-05)

Wrapping the second @prompt in a to_date() should do the trick.

Joe


joepeters :us: (BOB member since 2002-08-29)

It seems your object data type is date and when you are entering the date in the prompt is taking as a char, so you have make it to_date(prompt value)


SivakumarS :singapore: (BOB member since 2006-08-10)

Thanks Joe and Siva.
Wrapping second prompt value to to_date worked for me :smiley:


aniketp :uk: (BOB member since 2007-10-05)

connection or SQL SENTENCE ERROR (da005)
Exception -DBD-ORA-00604: error occured at recrusive SQL level IORA-00932- INCONSISTENT DATATYPE: EXPECTED date GOT number STATE:n/a

screen short attached
xcx.jpg


vikingv009 (BOB member since 2016-10-13)