Results 1 to 9 of 9

Thread: Oracle Question

  1. #1
    Join Date
    Jul 2004
    Posts
    268

    Unanswered: Oracle Question

    Hi,

    Can I join two views, and if yes how?

  2. #2
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Hello,

    Yes, of course, you can join views just as if they were tables (speaking of SQL syntax). However, joining views will take longer than joining tables.

    As far as I know, any SELECT query can be executed upon a view, except a SELECT... FOR UPDATE, for not all views support underlying data modifying (insert, delete, update).

    Regards,

    RBARAER
    Last edited by RBARAER; 09-14-04 at 10:45.

  3. #3
    Join Date
    Apr 2004
    Posts
    246
    take more time? why do you say that? if the views are aggregates, then yes it can take more time. but joining two views which each are just multi-table joins (without group by's) doesn't mean it will take longer. it also depends on keys being present in the select lists of the views for joining. if it is slow, the pust_predicate hint help (or others)
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

  4. #4
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Hello shoblock,

    You're right, it MAY take more time.

    Regards,

    RBARAER

  5. #5
    Join Date
    Jul 2004
    Posts
    268

    Oracle Question

    Each view is created using columns from more than one table. To join tables you set common columns equal to each other. How to find common columns between two views, if they are created from multiple tables? Thanks.

  6. #6
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Right inka, you have to know on which field you will join the views, but it is just as when you join tables. If you need more help, please give the example that is troubling you.

  7. #7
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Quote Originally Posted by inka
    Each view is created using columns from more than one table. To join tables you set common columns equal to each other. How to find common columns between two views, if they are created from multiple tables? Thanks.
    You cannot join 2 views without understanding what the views are, that is true! No one here can help you with that problem... If the meaning of the views is not obvious, you should consult the person who designed them, or the documentation they left behind (ha ha). Or failing that, look at the view definitions and work out what columns come from where.

  8. #8
    Join Date
    Jan 2003
    Location
    China
    Posts
    38

    Talking Of course

    As views actually are queries,the join statments are queries too.You can use views in your join statements as you use queries.Nothing to doubt.
    Fan Yi

  9. #9
    Join Date
    Jul 2003
    Posts
    2,296
    bah!

    If you want to join two views, then just create a NEW view based on the columns/data you want from the original tables.

    Why even bother joining the views? Create your own for what you want.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •