COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: hrk551 on 28 Sep 2009 01:42:12 PM

Title: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: hrk551 on 28 Sep 2009 01:42:12 PM
Recently we moved from 8.3 to 8.4, and Oracle 10g to 11g. 2 reports are not working in this process

1 report error:
1) UDA-SQL-0219 The function "nvl" is being used for local processing but is not available as a built-in function, or at least one of its parameters is not supported.

second report error:
2)UDA-SQL-0107 A general exception has occurred during the operation "prepare".
ORA-30076: invalid extract field for extract source

Thanx in advfor your help
Title: Re: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: Suraj on 28 Sep 2009 01:46:41 PM
What is the expression in data item?
I will test and see if it works here.
Title: Re: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: hrk551 on 29 Sep 2009 09:00:17 AM
1) extract(day, [DISB Date] - {sysdate} )

2)nvl([SR Loan],0)+nvl([Orig Equity],0)+nvl([Guarantee Amt],0)+nvl([Sub Loan],0)+nvl([Quasi Equity],0)+nvl([SCF Amount],0)
Title: Re: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: blom0344 on 30 Sep 2009 04:59:50 AM
Quote from: hrk551 on 29 Sep 2009 09:00:17 AM
1) extract(day, [DISB Date] - {sysdate} )


What is this supposed to yield? You are using an Oracle expression within a Cognos one. Why not use current_date to build a fully Cognos expression?
Title: Re: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: Suraj on 30 Sep 2009 10:23:10 AM
1) extract(day, [DISB Date] - {sysdate} )

Okay, I'm not sure as well on what you are trying to return.

Just [DISB Date] - {sysdate}   gives you days difference. Why do you have to extract day after that?
You extract day from a date not from a difference between dates.
You can either use [DISB Date] - {sysdate}    or extract(day, [DISB Date] ) - extract(day, {sysdate} )

Haven't had chance to test 2).
Title: Re: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: rthomas on 30 Sep 2009 11:42:07 AM
We had the same problem on a few reports and resolved by using the coalesce function.

Hope this works.  Good luck

RT
Title: Re: 8.3>> 8.4 ... reports with Nvl and Extract functions are not working
Post by: hrk551 on 30 Sep 2009 12:55:58 PM
Suraj --- what you said worked for me. I dont know how the old condition worked fine in 8.3.


Thank you all for ur replys.