Home » Developer & Programmer » Reports & Discoverer » DECODE ERROR (disc 10.1.2)
DECODE ERROR [message #349938] Tue, 23 September 2008 09:34 Go to next message
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Hi All
I used the following calculation in the disco plus :

DECODE (Primes And Subs Vw.Firm Type Code, S, Primes And Subs Vw.Sub Firm Name, P, Primes And Subs Vw.Prime Firm Name)
When the firm type code is S it must give me the sub firm name and when the firm type code is P then it must give me the prime firm name, but instead its giving me the following error:

An error occured while attempting to perform the operation. The operation didnt complete successfully.
Any help is greatly appreciated.

Thank You
Re: DECODE ERROR [message #352072 is a reply to message #349938] Sun, 05 October 2008 23:49 Go to previous messageGo to next message
Messages: 16
Registered: June 2007
Location: Chennai
Junior Member
pls check null value for firm type and include default clause of decode. and more over cant use decode in plsql...
Re: DECODE ERROR [message #355209 is a reply to message #352072] Thu, 23 October 2008 02:42 Go to previous message
Messages: 225
Registered: October 2008
Location: philippines
Senior Member
you should remeber that the syntax for decode is ..

decode(object, compare, result1, result2)

so try this code

decode(firmtypecode,'S',subfirmname , decode(firmtypecode,'p',prime firm name,'yourvalue if it is no S or P') );
Previous Topic: format triggers
Next Topic: Discoverer video stores sample database
Goto Forum:

Current Time: Sat Oct 22 22:34:10 CDT 2016

Total time taken to generate the page: 0.16132 seconds