Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get info on view columns' source (field) ?
-- Bjørge Sæther bjorge_at_hahaha_itte.no "TurkBear" <john.greco_at_dot.state.mn.us> skrev i melding news:bq4equc3m8t948ior1ijik7ep75ri53bs4_at_4ax.com...Received on Sun Oct 13 2002 - 14:54:00 CDT
> Since a view is just a set of sql statements you can use
>
> In SqlPlus
> ----------------------------
> set long=4000
> select text from all_views ( or user_views) where view_name =
'PERSON_LIST';
> -----------------------------------------------------------------
> will give you the 'source' of the view's fields..
Yes, thank you, but I'll have to write a parser then...
>
>
>
> "Bjørge Sæther" <bjorge_at_hahaha_itte.no> wrote:
>
> >----- Original Message -----
> >From: "Peter van Rijn" <pgm.van.rijnRM_at_THIShccnet.nl.agmasys.com>
> >To: "Bjørge Sæther" <bjorge_at_itte.no>
> >Sent: Friday, October 11, 2002 2:14 PM
> >Subject: Re: How to get info on view columns' source (field) ?
> >
> >
> >| Bjørge,
> >|
> >| I'm very sorry, I read your question about five times and I still don't
> >| understand what it is you want. Please explain.
> >|
> >| Peter
> >
> >Hi !
> >
> >What I'm after, is knowing what kind of fields exists in a result set.
The
> >stmt "select * from person_list" returns columns that are partly
identical
> >to the field as found in the underlying table ("ID" in my example),
partly
> >calculated columns ("NAME" in my example). This info I need.
> >
> >Thank you.
> >
> >|
> >| "Bjørge Sæther" <bjorge_at_itte.no> schreef in bericht
> >| news:1ccf751c.0210110404.4995841a_at_posting.google.com...
> >| > Hi !
> >| >
> >| > (Ora 8.1.6)
> >| >
> >| > Given this table:
> >| >
> >| > CREATE TABLE PERSON (
> >| > ID NUMBER(38) NOT NULL PRIMARY KEY,
> >| > FIRST_NAME VARCHAR2(50),
> >| > LAST_NAME VARCHAR2(50)
> >| > )
> >| >
> >| > ...and this view:
> >| >
> >| > CREATE VIEW PERSON_LIST AS
> >| > SELECT
> >| > ID,
> >| > FIRST_NAME||' '||LAST_NAME NAME
> >| > FROM
> >| > PERSON
> >| >
> >| > ...I want to get this information from Oracle about the view (format
> >| > is not important, it is for internal use in a Delphi application):
> >| >
> >| > FIELD SOURCE
> >| > -------------
> >| > ID PERSON.ID
> >| > NAME (CALCULATED)
> >| >
> >| > ...??
> >| >
> >| > Thanks in advance !
> >| >
> >| > Bjørge
> >|
> >|
> >|
> >
> >Bjørge Sæther
> >
> >
> >
>
>
>
> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
==----------
> http://www.newsfeed.com The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
=-----
![]() |
![]() |