Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to store data in vArray and use in If Statement

Re: How to store data in vArray and use in If Statement

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 12 Mar 2007 08:56:30 -0700
Message-ID: <1173714990.507207@bubbleator.drizzle.com>


sanjeev wrote:
> Hi friends,
>
> I have table called ANI_Master which stores codes
>
> Please look at following query.
>
> SELECT CALL_START_TIME,
> CALL_TYPE_ID,
> COUNT(CASE WHEN SUBSTR(ANI,1,8) IN
> ('+9198830','+9198831','+9198832') THEN ANI END) AS RELIANCE,
> COUNT(CASE WHEN SUBSTR(ANI,1,8) NOT IN
> ('+9198830','+9198831','+9198832') AS NON_RELIANCE,
> from callbycall
> group by CALL_START_TIME;
>
> In above case I need to use hardcoded values eg.
> ('+9198830','+9198831','+9198832') in CASE statement though there is
> table ANI_master.
> Is there any way to so that i can store the ANI values in array and
> use that array in IF statements.
>
> Thanking in advance
> Sanjeev

http://www.psoug.org
click on Morgan's Library
click on Conditions
scroll down to "COMPLEX IN demo"

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Mar 12 2007 - 10:56:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US