Re: dynamic view

From: Tim X <timx_at_spamto.devnul.com>
Date: 14 Dec 2002 15:42:02 +1100
Message-ID: <874r9hw6sl.fsf_at_tiger.rapttech.com.au>


reachgopi_at_yahoo.com (ck) writes:

> I am new oracle programming and I want to create a dynamic view ,
> which is a combination of following tables –
>
> Project Table
>
> Project F code
> DSAA 0012
> DSAB 0013
> DSAC 0013
>
> Activity Table
>
> Activity Activity Value
> 1000TA 12
> 2000TA 13
> 3000TA 14
>
> Activity Def Table
>
> Owner Activity name
> DS ASD
> DS AFD
> DS PFD
> DO ASD
> DO AFD
> DO PFD
> Right now this table has 51 records. In future there chance it might
> increase to infinite number of rows. Each row I this Table has
> related value in the Activity Table. I want dynamic code in the View
> so that when ever this table is updated it should reflect in the
> results.

This is what a view does anyway. Just define your view and it will be updated as the data in the underlying tables update anyway. Thats what a view is all about.
>
> This how the Result should look like-
>
> Project Activity ASD AFD PFD Activity ASD AFD PFD
> DSAA 1000TA 12 12 12 2000TA 13 13 13
> DSAB 1000TA 12 12 12 2000TA 13 13 13
> I want the values to be displayed as a cross tab. The rows in the
> Activity Def and Activity Tables should be displayed as columns in the
> Result. Each Activity Name in the Activity Table will have a record in
> the Activity Table.

How the results look is a totally different question - the view just provides a window into your underlying table(s) data. The way the data is displayed all depends totally on the tools you are using to query the database. for example, if your using sqlplus, then the output will depend on the select clause you use to select data from your view, the way sqlplus is configured via the many variables like "DEFINE for setting column formats, headings etc, SET PAGES, SET LINE, SET TRIM etc etc.

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
Received on Sat Dec 14 2002 - 05:42:02 CET

Original text of this message