Re: Question about DECODE
From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 22 Aug 2008 21:09:14 -0700
Message-ID: <1219464543.525457@bubbleator.drizzle.com>
Date: Fri, 22 Aug 2008 21:09:14 -0700
Message-ID: <1219464543.525457@bubbleator.drizzle.com>
Mtek wrote:
> Hi,
>
> I have a question about DECODE. I know that I can return a 1 or 0
> using DECODE:
>
> SELECT (DECODE...,1,0) FROM <table name> WHERE........;
>
> My question is, what you need to just decode the result of the where?
> Basically if all the criteria of the WHERE statement is true, return a
> 1, and if any of the criteria is false, return a 0.
>
> SELECT (DECODE...,1,0) FROM <table name> WHERE........
> AND.......AND......;
>
> Is there a way to do that?? Subqueries? Analytical functions??
- Duplicate Post ***
Please post only one message in one group. Thank you.
-- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Fri Aug 22 2008 - 23:09:14 CDT