Re: VIEWS - Need Help

From: Shirley Burk <sburk_at_gte.net>
Date: Fri, 24 Jul 1998 20:13:17 -0400
Message-ID: <6pb808$cco$1_at_news-1.news.gte.net>


Jim,

It looks like you really have 1 of 2 choices. 1) use the prior suggestion and add another column to the select

   that is set to the "in_stat_cd" and when you select from the view    include this as part of the where clause    select * from my_view
   where client='xxx'

     and billing_period = x
     and in_stat_cd = 'COM'

2) create separate views

Option 1 would cause a slower response time and option 2 would definitely case more programming.

sburk_at_gte.net

NeedaHoliday wrote in message <35b87c38.1831794_at_news.pwgsc.gc.ca>...
>I guess I wasn't to clear. Because I need to pass parms into the
>view, i.e. billing period, client etc, I was trying to find out if it
>was possible. The system is billing period sensitive. If the current
>month is selected, many tables are joined to extract the data. If
>historical data is requested, a different table is selected that
>contains all data. To avoid many joins, we created a denormalized
>table containing all data. Once the billing period is closed, the
>data becomes reference historical information. Quicker response time.
>
>Can I create a procedure that call the view?
>
>On Thu, 23 Jul 1998 15:41:24 GMT, NeedaHoliday wrote:
>
>>Requirement:
>>
>> Enter logic in the view to determine which part of the view is
>>created.
>>
>>i.e
>>Create or replace VIEW name AS
>>
>>
>> if IN_stat_cd = 'COM'
>>
>> Select .........
>>
>> else
>>
>> Select ........
>>
>> end if
>>
>>Is this possible and how.
>>
>>I can't find an example.
>>
>>Jim
>
Received on Sat Jul 25 1998 - 02:13:17 CEST

Original text of this message