inconsistent datatypes expected date got number

there is a error coming while running a deski report.
the error is showing error “ora-00932 inconsistent datatypes expected date got number” :crazy_face: [/b]


vikingv009 (BOB member since 2016-10-13)

Welcome to B:bob:B!

Can you post the query that DeskI generated and sent to a database?


Marek Chladny :slovakia: (BOB member since 2003-11-27)

i run the deski report and it is showing the error .
is ut a database error?
more over i can find errors in webi bit not the same in deski


vikingv009 (BOB member since 2016-10-13)

The error indicates that a numeric value is being passed to a function that expects a date. The problem is in the SQL that the report is generating.


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

its showing

connection or SQL sentence error:(DA0005)

eXCEPTION : DBO,ORA-00604: ERROR OCCURED AT RECUSIVE sql LEVEL IORA-00932: INCONSISTENT DATATYPES:EXPECTED DATE GOT NUMBER STATE:N/A

WHAT IS THE SOLUTION FOR THIS. IT IS A DESKI REPORT


vikingv009 (BOB member since 2016-10-13)

solution for this
^AD42332D04CF25E75A9EA83620B1BC363ED62C61EE95035DAD^pimgpsh_fullsize_distr.png


vikingv009 (BOB member since 2016-10-13)

Please do not bump your post until at least one business day has passed.


Nick Daniels :uk: (BOB member since 2002-08-15)

As Marek said, please post the SQL from the query.


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

WHAT IS THE SOLUTION FOR THIS 3 ERRORS AND HOW TO RESOLVE IT.
APPLIED ALL THOSE THAT WAS GIVEN IN THIS POST BUT STILL THE REPORT IS NOT ABLE TO GET CLEAR.
100 REPORTS ARE THERE AND ONLY IN 1 REPORT THIS ERROR IS COMING.
SO HOW TO RESOLVE IT.


vikingv009 (BOB member since 2016-10-13)

Hi,

Can you post here the SQL statement from the report? I am afraid but without it we have too few details to provide any further help.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

You are only providing the error message. It is impossible to help you debug the problem if you won’t provide the SQL that the report is generating.


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

it is not a webi report. this is a deski report so how to get sql for deski report


vikingv009 (BOB member since 2016-10-13)

Hit the toolbar button that says “SQL”.


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

check the below link
https://archive.sap.com/discussions/thread/3612962

can u share me a screen short of what are u saying.


vikingv009 (BOB member since 2016-10-13)

See attached.
sql.png


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

how can the SQL will help in resolving the issue for the particular report.
other reports are going fine . just only one report is having this errors.

ORA-00604, ORA-00932
AS WELL AS da005


vikingv009 (BOB member since 2016-10-13)

I’ve tried to help, but am unable to do any more without your cooperation.


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

Other reports very likely generate different SQL statements than the report you have a problem with.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Hi Joepeters

As we have a discussion regarding the query and you have asked me for the SQL to resolve the issue .
So here is the SQL for the particular Deski report that is given below-

SELECT
DIM_ENTRY.ENTRy_TYPE_CDE,
DIM_ENTRY.CAT_CDE,
to_char(FCT_ACCOUNTING_TRANSACTION.YEAR_OF_ACCOUNT_NUM),
sum(decode(DIM_ENTRY.CAT_CDE,‘0’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT-FCT_ACCOUNTING_TRANSACTION.NET_CLM_SETT_AMT,decode(DIM_ENTRY.CAT_CDE,‘1’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,decode(DIM_ENTRY.CAT_CDE,‘2’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,decode(DIM_ENTRY.CAT_CDE,‘3’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,decode(DIM_ENTRY.CAT_CDE,‘6’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,decode(DIM_ENTRY.CAT_CDE,‘7’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,0))))))),
CONCAT(( DIM_TRANSACTION.LPSO_NUM ),CONCAT(( DIM_PERIOD_LPSO_DATE.PROC_DATE ),( DIM_TRANSACTION.TXN_VER_NUM ))),
DIM_SYNDICATE.SYND_TYPE_CDE,
sum(decode(DIM_ENTRY.CAT_CDE,‘0’,FCT_ACCOUNTING_TRANSACTION.NET_CLM_SETT_AMT,decode(DIM_ENTRY.CAT_CDE,‘8’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,decode(DIM_ENTRY.CAT_CDE,‘9’,FCT_ACCOUNTING_TRANSACTION.NET_SETT_CCY_AMT,0))))
FROM
DIM_ENTRY,
FCT_ACCOUNTING_TRANSACTION,
ADS.HLP_SECTION_ACC_TXN_REL DIM_TRANSACTION,
DIM_PERIOD DIM_PERIOD_LPSO_DATE,
DIM_SYNDICATE,
DIM_BUSINESS_CATEGORY,
DIM_PERIOD
WHERE
( FCT_ACCOUNTING_TRANSACTION.ADS_SYND_KEY=DIM_SYNDICATE.ADS_SYND_KEY )
AND ( DIM_BUSINESS_CATEGORY.ADS_BUS_CAT_KEY=FCT_ACCOUNTING_TRANSACTION.ADS_BUS_CAT_KEY )
AND ( FCT_ACCOUNTING_TRANSACTION.ADS_PROC_DATE_KEY=DIM_PERIOD.ADS_DATE_KEY )
AND ( DIM_ENTRY.ADS_ENTRY_TYPE_KEY=FCT_ACCOUNTING_TRANSACTION.ADS_ENTRY_TYPE_KEY )
AND ( DIM_TRANSACTION.EFF_MKT_VER_NUM=FCT_ACCOUNTING_TRANSACTION.EFF_MKT_VER_NUM and DIM_TRANSACTION.SECT_REF_NUM=FCT_ACCOUNTING_TRANSACTION.SECT_REF_NUM and DIM_TRANSACTION.SLIP_REF_NUM=FCT_ACCOUNTING_TRANSACTION.SLIP_REF_NUM and DIM_TRANSACTION.TXN_REF_NUM=FCT_ACCOUNTING_TRANSACTION.TXN_REF_NUM and DIM_TRANSACTION.TXN_VER_NUM=FCT_ACCOUNTING_TRANSACTION.TXN_VER_NUM )
AND ( DIM_TRANSACTION.ADS_LPSO_DATE_KEY=DIM_PERIOD_LPSO_DATE.ADS_DATE_KEY )
AND (
DIM_ENTRY.CAT_CDE IN (‘0’, ‘1’, ‘2’, ‘3’, ‘6’, ‘7’, ‘8’, ‘9’)
AND DIM_BUSINESS_CATEGORY.DELINK_CDE != ‘D’
AND DIM_PERIOD.PROC_DATE BETWEEN @variable(‘01. Processing Date From’) AND @variable(‘02. Processing Date To’)
)
GROUP BY
DIM_ENTRY.ENTRy_TYPE_CDE,
DIM_ENTRY.CAT_CDE,
to_char(FCT_ACCOUNTING_TRANSACTION.YEAR_OF_ACCOUNT_NUM),
CONCAT(( DIM_TRANSACTION.LPSO_NUM ),CONCAT(( DIM_PERIOD_LPSO_DATE.PROC_DATE ),( DIM_TRANSACTION.TXN_VER_NUM ))),
DIM_SYNDICATE.SYND_TYPE_CDE

Please go through the SQL and let me know where is the problem occurring and steps to resolve it


vikingv009 (BOB member since 2016-10-13)

AND DIM_PERIOD.PROC_DATE BETWEEN @variable('01. Processing Date From') AND @variable('02. Processing Date To') 

Looks like this is your issue, I would talk to your universe Designer and get this created as an actual prompt, using @prompt syntax?


Mak 1 :uk: (BOB member since 2005-01-06)