DECODE ERROR [message #349938] |
Tue, 23 September 2008 09:34 |
aarti81
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 |
bernandas
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 |
xpact83
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') );
|
|
|