There is no simple answer. It depends on what is in the column CEXRPTSUMMARYDETAIL. It could be 'Y' or 'N'/0 or 1/'T' or 'F', or something else entirely. Try doing "select distinct CEXRPTSUMMARYDETAIL from table" and see what you get back.
As you know, TRUE and FALSE, in and of themselves, are BOOLEAN expressions. Oracle's DECODE function is not prepared to use either TRUE or FALSE as any of its arguments or resulting-expression value. Therefore, the best that you can hope for is to produce CHARACTER expressions (via single quotes) that represent TRUE or FALSE values. You can say:
Code:
DECODE(CEXRPTSUMMARYDETAIL,0,'False','True') AS ExceptionSummary
...or...
Code:
DECODE(CEXRPTSUMMARYDETAIL,0,'F','T') AS ExceptionSummary
...or...
Code:
DECODE(CEXRPTSUMMARYDETAIL
,0,'<any other value that represents FALSE>'
,'<any other value that represents TRUE>')
AS ExceptionSummary
Let us know if this is useful to you.
Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.