Create a view on a table where x = Report_paramter

Hi people,
I want to create a view, but in the where clause I wanted to be dependable on the parameter entered in the Report builder parameter form
Example
CREATE OR REPLACE VIEW TMP AS
( SELECT *
FROM EMP
WHERE EMP_NO = &EMP_ID (this will be entered in the parameter form of the report builder)

Create a package variable and define it in your view.
Assign the value to parameter before accessing the view.
CREATE OR REPLACE VIEW TMP AS
( SELECT *
FROM EMP
WHERE EMP_NO = package.varibale_name

Similar Messages

  • HOW CAN I CREATE A VIEW FROM SAME TABLE WHERE I NEED COLUMNS DETAILS FROM DIFFERENT ROWS IN THE SAME TABLE

    i have a table1 on the top, but i want to create a view from table 1 as  view mentioned beneath the table 2. Could any of you please help me.
    table1
    ID
    office
    employee
    activity
    1
    246
    -9999
    698
    2
    ##-99
    21480
    698
    3
    104
    -9999
    7025
    4
    ##-99
    88908
    7025
    5
    108
    -9999
    2415
    6
    ##-99
    17135
    2415
    7
    246
    -9999
    698
    8
    ##-99
    21480
    698
    9
    104
    -9999
    7025
    10
    ##-99
    88908
    7025
    11
    108
    -9999
    2415
    12
    ##-99
    17135
    2415
    view
    ID
    office
    ID1
    employee
    activity
    1
    246
    2
    21480
    698
    3
    104
    4
    88908
    7025
    5
    108
    6
    17135
    2415
    7
    246
    8
    21480
    698
    9
    104
    10
    88908
    7025
    11
    108
    12
    17135
    2415

    declare @forumsTable table (ID int, officeID int, employeeID INT, activityID int)
    insert into @forumsTable (ID, officeID, employeeID, activityID)
    values
    (1 ,246, -9999, 698 ),
    (2 ,-99, 21480, 698 ),
    (3 ,104, -9999, 7025),
    (4 ,-99, 88908, 7025),
    (5 ,108, -9999, 2415),
    (6 ,-99, 17135, 2415),
    (7 ,246, -9999, 698 ),
    (8 ,-99, 21480, 698 ),
    (9 ,104, -9999, 7025),
    (10 ,-99, 88908, 7025),
    (11 ,108, -9999, 2415),
    (12 ,-99, 17135, 2415)
    select f1.ID, f1.officeID, f2.ID as ID1, f1.employeeID, f1.activityID
    from @forumsTable f1
    inner join @forumsTable f2
    on f1.activityID = f2.activityID
    and f1.officeID > 0
    and f2.employeeID > 0
    and f1.id - f2.id = -1
    You really need to improve the relationship here.
    Perhaps you could make office and activity an exclusive pair.

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • Create a view from multiple tables

    Hi all,
    I am a newbie, so sorry if this is a "basic" question.
    I had 3 tables TAB1, TAB2 and TAB3
    TAB1 has
    STU_ID(pk), NAME, GRADE, ADDRESS
    TAB2 has
    COURSE_ID(pk), STU_ID(fk), COURSE_NAME, ROOM_NUM, TIME, DAY
    TAB3 has
    MENTOR_NAME, TITLE, AVAILABLE_DAYS
    Now I want to create a view(or query) that returns STU_ID, COURSE_NAME, NAME, GRADE, MENTOR_NAME and TITLE.
    When I tried writing a query like
    SELECT a.STU_ID, b.COURSE_NAME, a.NAME, a.GRADE, c.MENTOR_NAME, a.TITLE
    FROM TAB1 a, TAB2 b, TAB3 c
    WHERE a.STU_ID=b.STU_ID
    I am getting multiple results..like I'm getting Mentor name 4 times, name 4 times like that.
    So can anybody help me in writing the query for this....a "VIEW" would be appreciated.
    Thanks In Advance
    Srra

    You query should return all the columns in the select list once for each and every row that meets the specified join condition, how does this differ from what you are getting?
    So if tableA is the student table with only one row per student you would expect to see the student data duplicated once for every matching course row found in tableB, and so on when tableC is added in.
    If you need help please post partial results and then explain what results you want.
    HTH -- Mark D Powell --
    PS as sb mention you forgot your join condition to tableC which would multiply tableC by the other tables.
    Edited by: Mark D Powell on Feb 3, 2010 9:18 AM

  • Create materialized View fails with "table or view does not exist"

    DB: 10.2.0.4
    OS: Win 2003
    Hi,
    Here in my tests, i have 2 databases (A(source) and B(backup)), and i am trying to create an mview in database B to replicate data from one test table from database A, only for test purpose. I'm getting the error "table or view does not exist" when i try to create a mview with REFRESH FAST. Here is my code:
    CREATE MATERIALIZED VIEW TESTES.TAB_TESTES_REPLIC_MVIEW_02
    REFRESH FAST
    START WITH TO_DATE('21/02/2012 18:50:00', 'DD/MM/YYYY HH24:MI:SS')
    NEXT SYSDATE + 1/24/60
    WITH PRIMARY KEY
    AS SELECT REGISTRO1,
    REGISTRO2
    FROM TESTES.TAB_TESTES_REPLIC_MVIEW_02@DB_LINK_ORA10;
    The dblink is workig fine(dblink user has select privilege on TESTES.TAB_TESTES_REPLIC_MVIEW_02), and i have created the mview log on database A.
    Where is my mistake.
    Thanks a lot.
    Edited by: Fabricio_Jorge on 21/02/2012 19:06

    I found the solution.
    I had to grant SELECT on the mview log. The name is avaiable in DBA_MVIEW_LOGS

  • Create a view with a changing where clause

    Hi all,
    i'm developing an application with oracle forms i want to create a view in the database with a different where clause in every time , the where clause is determined due to the department id of the current user .
    thanks alot.

    SQL> create view emp_view as select empno, ename, deptno from emp;
    View created.
    SQL> select * from emp_view where deptno = 10;
         EMPNO ENAME          DEPTNO
          7782 CLARK              10
          7839 KING               10
          7934 MILLER             10
    SQL>

  • Create a View with many tables with the Table-Fieldnames

    Hello!
    Question 1)
    Which kind of view is the correct for joining
    many tables together.
    Question 2)
    What is the solution in case of having several tables
    with the same fieldnames by creating a view. How can I choose this fields
    into a view. I cant use the same name twice in section
    (tab strip) ViewFlds.
    Regards
    Ilhan

    Hi Ilhan,
    There is no problem in the view fieldname you can put something like this :
    This is you who choose the view field name so...
    View Fieldname         Table           Field
    VBAK_VBELN           vbak             vbeln
    vbap_vbeln                 vbap             vbeln
    Erwan

  • Create a view from 10 tables

    Hi Experts,
    I want to create a view from 10 pricing tables rather than write 10 different select query in my application. Most of the columns of the pricing tables are same. I want all the data from these tables into the respective columns. Further I want an indicator as to which table does this record belong to. How can I achieve this?
    Ex:
    Table 1 columns: kappl kschl vkorg vtweg vkgrp
    Table 2 columns: kappl kschl vkorg vtweg matkl matnr
    if each table has two records, I want 4 records in my view in the respective columns along with the indicator that this record belongs to a specific column.
    Regards

    Hi,
    Placing 10 tables in one view will drastically affect performance. This is highly unrecommended.
    Anyhow if you insist on doing so you can create [database view|http://help.sap.com/saphelp_nw04/helpdata/en/36/74c0358373003ee10000009b38f839/frameset.htm] or use explicitly joins in your program.
    Keep in mind that althought it is possible to use projection (only selection of choosen column) it is not logically appropriate to locate which table this column belongs to (as far as we are talking about key fields) as both have the same field as key field.
    On the other hand when using projection for non-key columns it is you who define what is to be selected and how, therefore you know which column belongs to which table.
    i.e
    data: begin of st,
              lgart type t512w-lgart,
              molga type t512w-molga,
              lgtxt   type t512t-lgtxt,
            end of st.
    select w~molga w~lgart t~lgtxt   "<- here using aliases you know which column is taken from which table
      into st
      from T512W as W
      inner join T512T as T on
         W~LGART = T~LGART.
      write: / st-lgart, st-molga, st-lgtxt.
    endselect.
    In this example lgart (key field) can be taken from either t512w or t512t, but fields mogla and lgtxt are taken from t512w and t512t respectively.
    All in all this is correct as far as up to 3-4 tables are concerned. But 10 will be a disaster...
    Hope this helps you
    Marcin

  • Problem in creating a view over multiple tables

    How do I create a View on top of the bCrelow tables. I have metioned the key fields of each table. How do i join the tables with common fields? I also need to create a Generic Extractor over the View later.
    Z3PVR ( Custom Z table ):
    Key Fields--> MANDT: Client; BUKRS: Company Code; WERKS: Plant; EBELN: Purchasing Document Number; ELNR: Accounting Document Number.
    BSEG ( Cluster Table ):
    Key Fields--> MANDT: Client; BUKRS: Company Code; BELNR: Accounting Document Number; GJAHR: Fiscal Year; BUZEI: Number of Line Item Within Accounting Document
    CKIS ( Transparent Table ):
    MANDT: Client; LEDNR: Ledger for Controlling objects; BZOBJ: Reference Object; KALNR: Cost Estimate Number for Cost Est. w/o Qty Structure; KALKA: Costing Type; KADKY: Costing Date (Key); TVERS: Costing Version; BWVAR: Valuation Variant in Costing; KKZMA: Costs Entered Manually in Additive or Automatic Cost Est.; POSNR: Unit Costing Line Item Number
    BKPF ( Transparent Table ):
    MANDT:Client; BUKRS: Company Code; BELNR: Accounting Document Number;
    GJAHR: Fiscal Year
    RV61A ( Structure ):
    No Key
    T001 ( Transparent Table ):
    MANDT:Client; BUKRS:Company Code

    Hi Chintai,
    To create a view you can use Tcode SE11.
    In the first screen of view creation you must introduce the tables for the view and the conditions of join, remember to introduce always the field MANDT.
    You are introducing too much tables in your view and if I am not wrong you can not introduce Structures in a view.
    As a suggestion start introducing in View only the tables that contain all char you need and also the tables with a reduced number of keys (as T001).
    You can then obtain other fields from other tables via CMOD.
    To built up a Generic extractor on this view you can use Tcode RSO2.
    You can find under www.service.sap.com/bi an How to doc on Generic DataSource creation.
    Ciao.
    Riccardo.

  • Create a view using common table expressions

    I'm having trouble finding out if this is even possible in Oracle.
    Here is what I'm trying to accomplish with my view. A subject takes a survey numerous times across numerous dates. Depending on the responses to different questions, that subject is marked as having a set disease or affliction. The view that I'm building collects the necessary answers for each survey into one place (the first common table expression), then in subsequent CTEs, I'm adding the disease classification when the responses to the needed questions match. Sometimes the requirements state that the survey can't already be positive for other diseases, meaning that I need to ultimately discount them when checking subsequent diseases (each disease is built using it's own CTE of which there are 13). I built the query which performs these tasks with no problems. It runs and gives the responses that I'm looking for.
    The problem comes into play when I attempt to wrap the existing working query into a create view process. When I add CREATE OR REPLACE VIEW TESTENV.TESTVIEW AS ( and the ending ); after the query, it is giving me the error: ORA-32034: unsupported use of WITH clause.
    Am I getting the error simply because I can't put CTE's into views, or is it because the syntax for putting CTEs into Views is different than a normal view build process? Also, in case it makes a difference, the version of Oracle I'm using is: Oracle 10g.
    Thank you.

    Here is the view that I'm trying to build:
    <pre class="jive-pre">
    CREATE OR REPLACE VIEW GI_DEV.PAIN_COMP AS (
    WITH gatheredQuestions AS (
    SELECT
    s.date_of_survey_id,
    a.question_1 as A_1,
    a.question_5 as A_5,
    a.question_6 as A_6,
    a.question_7 as A_7,
    a.question_8 as A_8,
    a.question_9 as A_9,
    a.question_10 as A_10,
    a.question_12 as A_12,
    a.question_13 as A_13,
    a.question_14 as A_14,
    a.question_15 as A_15,
    a.question_16 as A_16,
    b.question_1 as B_1,
    b.question_4 as B_4,
    b.question_5 as B_5,
    b.question_6 as B_6,
    b.question_7 as B_7,
    b.question_8 as B_8,
    b.question_9 as B_9,
    b.question_11 as B_11,
    b.question_12 as B_12,
    b.question_13 as B_13,
    b.question_14 as B_14,
    b.question_15 as B_15,
    b.question_16 as B_16,
    b.question_16a_a as B_16a_a,
    b.question_16a_b as B_16a_b,
    b.question_16a_c as B_16a_c,
    b.question_16a_d as B_16a_d,
    b.question_16a_e as B_16a_e,
    b.question_16a_f as B_16a_f,
    b.question_16b as B_16b,
    c.question_1 as C_1,
    c.question_2 as C_2,
    c.question_3 as C_3,
    c.question_8 as C_8,
    c.question_9 as C_9,
    c.question_10 as C_10,
    c.question_11 as C_11,
    c.question_11a as C_11a,
    c.question_11b as C_11b,
    d.question_1 as D_1,
    d.question_2 as D_2,
    d.question_3 as D_3,
    d.question_4 as D_4,
    d.question_5 as D_5,
    d.question_5a as D_5a,
    d.question_5b as D_5b,
    d.question_5c as D_5c,
    d.question_6 as D_6,
    d.question_6a as D_6a,
    d.question_6b as D_6b,
    d.question_6c as D_6c,
    d.question_6d as D_6d
    FROM
    new_date_of_survey s
    LEFT OUTER JOIN new_section_a a on a.solid_visit_a_id = s.date_of_survey_id
    LEFT OUTER JOIN new_section_b b on b.solid_visit_b_id = s.date_of_survey_id
    LEFT OUTER JOIN new_section_c c on c.solid_visit_c_id = s.date_of_survey_id
    LEFT OUTER JOIN new_section_d d on d.solid_visit_d_id = s.date_of_survey_id
    ), functDyspepsia as (
    SELECT
    date_of_survey_id,
    'Functional Dyspepsia' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.A_1 in (4, 5)
    and g.A_5 in (3, 4, 5, 6)
    and g.A_6 in (0, 2, 3)
    and (g.A_7 in (0, 2) and g.A_8 in (0,2))
    and (g.A_9 in (0, 2) and g.A_10 in (0, 2))
    ), IBSLower as (
    SELECT
    date_of_survey_id,
    'IBS Lower' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.B_1 in (3, 4, 5)
    and g.B_4 in (2, 3, 4, 5, 6)
    and 2 <= (CASE WHEN g.B_5 in (3, 4, 5) THEN 1 ELSE 0 END) + (CASE WHEN (g.B_6 in (3, 4, 5) and g.B_7 not in (3, 4, 5)) or (g.B_6 not in (3, 4, 5) and g.B_7 in (3, 4, 5)) THEN 1 ELSE 0 END) + (CASE WHEN (g.B_8 in (3, 4, 5) and g.B_9 not in (3, 4, 5)) or (g.B_8 not in (3, 4, 5) and g.B_9 in (3, 4, 5)) THEN 1 ELSE 0 END)
    ), IBSUpper as (
    SELECT
    date_of_survey_id,
    'IBS Upper' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.A_1 in (3, 4, 5)
    and g.A_5 in (3, 4, 5, 6)
    and 2 <= (CASE WHEN g.A_6 in (3, 4, 5) THEN 1 ELSE 0 END) + (CASE WHEN (g.A_7 in (3, 4, 5) and g.A_8 not in (3, 4, 5)) or (g.A_7 not in (3, 4, 5) and g.A_8 in (3, 4, 5)) THEN 1 ELSE 0 END) + (CASE WHEN (g.A_9 in (3, 4, 5) and g.A_10 not in (3, 4, 5)) or (g.A_9 not in (3, 4, 5) and g.A_10 in (3, 4, 5)) THEN 1 ELSE 0 END)
    ), abMigraine as (
    SELECT
    date_of_survey_id,
    'Abdominal Migraine' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.B_16 in (3, 4, 5)
    and 2 <= ((CASE WHEN g.B_16a_a = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.B_16a_b = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.B_16a_c = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.B_16a_d = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.B_16a_e = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.B_16a_f = 2 THEN 1 ELSE 0 END))
    and g.B_16b = 2
    ), lowerFunctAbPainSyndrome as (
    SELECT
    date_of_survey_id,
    'Functional Abdominal Pain Syndrome - Lower' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.B_1 in (4, 5)
    and g.B_4 in (3, 4, 5, 6)
    and date_of_survey_id not in (select date_of_survey_id from functDyspepsia union select date_of_survey_id from abMigraine union select date_of_survey_id from IBSLower union select date_of_survey_id from IBSUpper)
    and
    ((g.B_15 in (2,3,4,5) and 2 > ((CASE WHEN g.B_11 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.B_12 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.B_13 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.B_14 in (2,3,4,5) THEN 1 ELSE 0 END)))
    or (g.B_15 not in (2,3,4,5) and 2 <= ((CASE WHEN g.B_11 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.B_12 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.B_13 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.B_14 in (2,3,4,5) THEN 1 ELSE 0 END))))
    ), upperFunctAbPainSyndrome as (
    SELECT
    date_of_survey_id,
    'Functional Abdominal Pain Syndrome - Upper' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.A_1 in (4, 5)
    and g.A_5 in (3, 4, 5, 6)
    and date_of_survey_id not in (select date_of_survey_id from functDyspepsia union select date_of_survey_id from abMigraine union select date_of_survey_id from IBSLower union select date_of_survey_id from IBSUpper)
    and
    ((g.A_16 in (2,3,4,5) and 2 > ((CASE WHEN g.A_12 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.A_13 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.A_14 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.A_15 in (2,3,4,5) THEN 1 ELSE 0 END)))
    or (g.A_16 not in (2,3,4,5) and 2 <= ((CASE WHEN g.A_12 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.A_13 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.A_14 in (2,3,4,5) THEN 1 ELSE 0 END) + (CASE WHEN g.A_15 in (2,3,4,5) THEN 1 ELSE 0 END))))
    ), lowerFunctAbPain as (
    SELECT
    date_of_survey_id,
    'Functional Abdominal Pain - Lower' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.B_1 in (3, 4, 5)
    and g.B_4 in (3, 4, 5, 6)
    and date_of_survey_id not in (select date_of_survey_id from functDyspepsia union select date_of_survey_id from abMigraine union select date_of_survey_id from IBSLower union select date_of_survey_id from IBSUpper union select date_of_survey_id from upperFunctAbPainSyndrome union select date_of_survey_id from lowerFunctAbPainSyndrome)
    ), upperFunctAbPain as (
    SELECT
    date_of_survey_id,
    'Functional Abdominal Pain - Upper' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.A_1 in (3, 4, 5)
    and g.A_5 in (3, 4, 5, 6)
    and date_of_survey_id not in (select date_of_survey_id from functDyspepsia union select date_of_survey_id from abMigraine union select date_of_survey_id from IBSLower union select date_of_survey_id from IBSUpper union select date_of_survey_id from upperFunctAbPainSyndrome union select date_of_survey_id from lowerFunctAbPainSyndrome)
    ), functConstipation as (
    SELECT
    date_of_survey_id,
    'Functional Constipation' as pain_type
    FROM gatheredQuestions g
    WHERE
    2 <= ((CASE WHEN g.C_1 in (0, 2) THEN 1 ELSE 0 END) + (CASE WHEN (g.C_2 in (2,3) and g.C_3 <> 2) or (g.C_2 not in (2, 3) and g.C_3 = 2) THEN 1 ELSE 0 END) + (CASE WHEN g.C_8 = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.C_9 in (3, 4, 5) THEN 1 ELSE 0 END) + (CASE WHEN g.C_10 = 2 THEN 1 ELSE 0 END) + (CASE WHEN g.C_11 in (4, 5, 6) THEN 1 ELSE 0 END))
    and date_of_survey_id not in (select date_of_survey_id from IBSLower union select date_of_survey_id from IBSUpper)
    ), fecalIncontinence as (
    SELECT
    g.date_of_survey_id,
    'Nonretentive Fecal Incontinence' as pain_type
    FROM
    gatheredQuestions g
    left outer join new_date_of_survey s on s.date_of_survey_id = g.date_of_survey_id
    left outer join new_demographics d on d.solid_demographics_id = s.demo_id
    WHERE
    4 <= trunc((months_between(s.survey_date, d.date_of_birth))/12)
    and g.C_11 in (4, 5, 6)
    and g.C_11a in (2, 3)
    and g.C_11b in (3, 4, 5, 6)
    and g.date_of_survey_id not in (select date_of_survey_id from functConstipation)
    ), aerophagia as (
    SELECT
    date_of_survey_id,
    'Aerophagia' as pain_type
    FROM gatheredQuestions g
    WHERE
    2 <= ((CASE WHEN (g.D_1 in (3, 4, 5) and g.D_2 not in (3, 4, 5)) or (g.D_1 not in (3, 4, 5) and g.D_2 in (3, 4, 5)) THEN 1 ELSE 0 END) + (CASE WHEN g.D_3 in (3, 4, 5) THEN 1 ELSE 0 END) + (CASE WHEN g.D_4 in (3, 4, 5) THEN 1 ELSE 0 END))
    ), cycVomitSyndrome as (
    SELECT
    date_of_survey_id,
    'Cycllic Vomiting Syndrome' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.D_5 in (4, 5)
    and g.D_5a in (3, 4, 5, 6)
    and g.D_5b = 2
    and g.D_5c = 2
    ), adolRumSyndrome as (
    SELECT
    date_of_survey_id,
    'Adolescent Rumination Syndrome' as pain_type
    FROM gatheredQuestions g
    WHERE
    g.D_6 in (4, 5)
    and g.D_6a = 2
    and g.D_6b = 0
    and g.D_6c = 0
    and g.D_6d = 0
    ), gatheredPains as (
    +
    select * from functDyspepsia
    union
    select * from IBSLower
    union
    select * from IBSUpper
    union
    select * from abMigraine
    union
    select * from lowerFunctAbPainSyndrome
    union
    select * from upperFunctAbPainSyndrome
    union
    select * from lowerFunctAbPain
    union
    select * from upperFunctAbPain
    union
    select * from functConstipation
    union
    select * from fecalIncontinence
    union
    select * from aerophagia
    union
    select * from cycVomitSyndrome
    union
    select * from adolRumSyndrome
    SELECT
    date_of_survey_id,
    string_agg(pain_type) as PainType
    FROM gatheredPains
    GROUP BY date_of_survey_id
    </pre>
    I tried remove the leading and ending parenthesis, and ended up getting the error that it is missing the select keyword. When I take the create view step out of this, the query builds with no problem, so I know that it's not missing a select or that it isn't in the correct place.
    Thank you for all your help so far.

  • How to create a view between two table under different database?

    thx

    Assuming the different database is Oracle, you'll probably need to create a 'dblink'. Researching that topic should get you where you need to go.

  • Query to create a view using the following tables

    Hi,
    I am struggling to write the proper query to create a view using three tables.
    I would really be thankful if anyone can help me.
    I am pasting the following script to create the required tables and also insert appropriate data in each of the table.
    create table HR.STUDENT_DETAILS (
    STUDENT_ID NUMBER(10),
    STUDENT_NAME VARCHAR2(50),
    DOB DATE,
    SEX CHAR(1),
    ACTIVE CHAR(1),
    CONTACT_NUMBER NUMBER(20),
    primary key(STUDENT_ID)
    create table HR.PAYMENT_HEADER (
    PAY_HEADER_ID NUMBER(10),
    DOC_NUM NUMBER(5),
    MONTH_NAME VARCHAR2(10),
    primary key(PAY_HEADER_ID)
    create table HR.PAYMENT_DETAILS (
    HEADER_ID NUMBER(10),
    LINE_ID NUMBER(10),
    STUDENT_ID NUMBER(10),
    CUM_AMOUNT NUMBER(10),
    primary key(HEADER_ID,LINE_ID)
    INSERT ALL
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1112,'James','17-JUN-05','M','Y',23674378)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1113,'David','21-SEP-05','M','Y',24565457)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1114,'Michael','13-JAN-06','M','Y',25436784)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1115,'Joseph','03-JAN-06','M','Y',23435673)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1116,'Juliet','21-MAY-05','F','Y',23234527)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1117,'Monica','25-JUN-05','F','Y',24873245)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1118,'William','05-FEB-05','M','Y',23623245)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1119,'Karen','07-FEB-06','F','Y',26757543)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1120,'Erika','17-AUG-05','F','Y',25435465)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1121,'Noah','16-AUG-05','M','Y',23457645)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1122,'Angelina','28-SEP-05','F','Y',26456787)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1123,'Gabriela','30-SEP-05','F','Y',29767543)
    INTO HR.STUDENT_DETAILS (STUDENT_ID,STUDENT_NAME,DOB,SEX,ACTIVE,CONTACT_NUMBER) VALUES (1124,'Sofia','07-MAR-06','F','Y',27656578)
    SELECT * FROM DUAL;
    INSERT ALL
    INTO HR.PAYMENT_HEADER (PAY_HEADER_ID,DOC_NUM,MONTH_NAME) VALUES (305,1,'JAN')
    INTO HR.PAYMENT_HEADER (PAY_HEADER_ID,DOC_NUM,MONTH_NAME) VALUES (306,2,'FEB')
    INTO HR.PAYMENT_HEADER (PAY_HEADER_ID,DOC_NUM,MONTH_NAME) VALUES (307,3,'MAR')
    INTO HR.PAYMENT_HEADER (PAY_HEADER_ID,DOC_NUM,MONTH_NAME) VALUES (308,4,'APR')
    INTO HR.PAYMENT_HEADER (PAY_HEADER_ID,DOC_NUM,MONTH_NAME) VALUES (309,5,'MAY')
    SELECT * FROM DUAL;
    INSERT ALL
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (305,12,1112,40)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (305,13,1113,40)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (305,14,1114,40)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (306,15,1112,80)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (306,16,1113,80)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (306,17,1114,80)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (306,18,1115,40)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (306,19,1116,40)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,20,1112,120)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,21,1113,120)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,22,1114,120)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,23,1115,80)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,24,1116,80)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,25,1117,40)
    INTO HR.PAYMENT_DETAILS (HEADER_ID,LINE_ID,STUDENT_ID,CUM_AMOUNT) VALUES (307,26,1118,40)
    SELECT * FROM DUAL;
    The above table STUDENT_DETAILS stores the details of all the students and each student has a unique student id.
    Another table PAYMENT_HEADER saves the payment details as a document for each month which has a header id.
    In the PAYMENT_DETAILS table, payment details are stored for the students (who made the payment for that month). This table does not save the data for a student if he has not paid on that month. This table is connected to the PAYMENT_HEADER table through a header Id.
    The view should be such that when I pass the document number, it shall show the names of all the students, but shall show payment amount only for those students who had paid under the selected document number, for other it should show null.
    I tried the following query:
    select * from (
    select sd.student_name,sd.DOB,sd.sex,sd.contact_number,pd.doc_num,pd.month_name,pd.cum_amount
    from hr.student_details sd left join
    (select hdr.doc_num,hdr.month_name,det.student_id,det.cum_amount
    from hr.payment_header hdr, hr.payment_details det
    where hdr.pay_header_id = det.header_id) pd on sd.student_id = pd.student_id)
    But when I pass the filtering values like document number, it does not show some students with null values.
    select * from (
    select sd.student_name,sd.DOB,sd.sex,sd.contact_number,pd.doc_num,pd.month_name,pd.cum_amount
    from hr.student_details sd left join
    (select hdr.doc_num,hdr.month_name,det.student_id,det.cum_amount
    from hr.payment_header hdr, hr.payment_details det
    where hdr.pay_header_id = det.header_id) pd on sd.student_id = pd.student_id)
    where doc_num = 1 or doc_num is null;
    My requirement is that, every time I use a document number in the where clause for the view it should show the paid amount against the student names who has paid on that month and for all other student it should null. Total student number is 13. So every time it should show 13 students only even when I pass document No 2 or 3.
    Seeking your help.
    Regards
    Hawker

    Hi Frank,
    as per your advice, I am omitting the 'DOB', 'GENDER','ACTIVE','CONTACT_NUMBER' fields from the 'STUDENT_DETAILS' table.
    I shall create separate tables and insert the desired output from the view for each where clause.
    First let us create three tables each for the desired out put:
    1) For the desired output I want to see when I pass doc_num as 1
    create table HR.SDT_PAY_DET_DOC_ONE (
    STUDENT_ID NUMBER(10),
    STUDENT_NAME VARCHAR2(50),
    DOC_NUM NUMBER(5),
    C_AMOUNT NUMBER(10),
    primary key(STUDENT_ID)
    2) For the desired output I want to see when I pass doc_num as 2
    create table HR.SDT_PAY_DET_DOC_TWO (
    STUDENT_ID NUMBER(10),
    STUDENT_NAME VARCHAR2(50),
    DOC_NUM NUMBER(5),
    C_AMOUNT NUMBER(10),
    primary key(STUDENT_ID)
    3) For the desired output I want to see when I pass doc_num as 3
    create table HR.SDT_PAY_DET_DOC_THREE (
    STUDENT_ID NUMBER(10),
    STUDENT_NAME VARCHAR2(50),
    DOC_NUM NUMBER(5),
    C_AMOUNT NUMBER(10),
    primary key(STUDENT_ID)
    Now I shall insert values in each of the above three tables:
    INSERT ALL
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1112,'James',1,40)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1113,'David',1,40)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1114,'Michael',1,40)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1115,'Joseph',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1116,'Juliet',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1117,'Monica',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1118,'William',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1119,'Karen',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1120,'Erika',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1121,'Noah',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1122,'Angelina',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1123,'Gabriela',null,null)
    INTO HR.SDT_PAY_DET_DOC_ONE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1124,'Sofia',null,null)
    SELECT * FROM DUAL;
    INSERT ALL
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1112,'James',2,80)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1113,'David',2,80)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1114,'Michael',2,80)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1115,'Joseph',2,40)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1116,'Juliet',2,40)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1117,'Monica',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1118,'William',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1119,'Karen',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1120,'Erika',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1121,'Noah',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1122,'Angelina',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1123,'Gabriela',null,null)
    INTO HR.SDT_PAY_DET_DOC_TWO(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1124,'Sofia',null,null)
    SELECT * FROM DUAL;
    INSERT ALL
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1112,'James',3,120)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1113,'David',3,120)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1114,'Michael',3,120)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1115,'Joseph',3,80)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1116,'Juliet',3,80)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1117,'Monica',3,40)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1118,'William',3,40)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1119,'Karen',null,null)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1120,'Erika',null,null)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1121,'Noah',null,null)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1122,'Angelina',null,null)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1123,'Gabriela',null,null)
    INTO HR.SDT_PAY_DET_DOC_THREE(STUDENT_ID,STUDENT_NAME,DOC_NUM,C_AMOUNT) VALUES (1124,'Sofia',null,null)
    SELECT * FROM DUAL;
    Thanks & Regards
    Hawker

  • How to create a view on tables with different keys?

    I have to create a View on:
    Z3PVR: Transparent Table
    BSEG: Cluster Table
    CKIS: Transparent Table
    BKPF: Transparent Table
    RV61A: Structure
    T001: Transparent Table
    All the tables have different "Key Fields" and the structure has no "Key Fields". When i create the view, what do I mention in the "JOIN FIELDS" tab. and how do i create the view with the structure?
    Please advise.

    How to create a view on a Non-Transparent Tables.
    how to create view?
    HELP.. How to create a view with the tables with ALV

  • Is it possible to use a pooled table when creating a view?

    Hi,
    I am trying to create a view based on table A005 but this table is a Pooled table and the system wont allow me to create a view on it.
    Is there any way to do this?
    Thanks,

    Hi,
      Join stmt can not be executed on Cluster tables & pooled tables.
    regards,
    ajit.

  • Trouble Creating View on External Table in Diff Schema

    I am unable to create a view in a different schema on an external table in a different schema, even when I am connected to my database as SYS as SYSDBA.
    CREATE VIEW WH1.EXT1VIEW AS SELECT * FROM WH1.EXT1VIEW;
    returns the error:
    ORA-06564: object ER_ADMIN_DIR does not exist
    I created a directory:
    CREATE DIRECTORY ER_ADMIN_DIR AS 'C:\ER_Init';
    Granted privs:
    grant read,write on directory ER_ADMIN_DIR to public;
    Created the external table EXT1 in a different schema WH1:
    CREATE TABLE WH1.EXT1 (TABLE_NAME VARCHAR2(100), COLUMN_NAME VARCHAR2(100))
    ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY SYS.ER_ADMIN_DIR
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
    LOCATION ('FILE1.TXT')
    REJECT LIMIT UNLIMITED;
    I can query from the table successfully connected as SYS:
    SQL> select count(*) from wh1.ext1;
    1008
    1 row selected.
    However when I try to create a view on that table connected as SYS:
    CREATE VIEW WH1.EXT1VIEW AS SELECT * FROM WH1.EXT1VIEW;
    I get the following error:
    ORA-06564: object ER_ADMIN_DIR does not exist
    I can connect over to the WH1 schema and create the view successfully, however due to a specific situation I need to be able to create the view from the SYS schema. I can create the view FORCE and it creates with compilation errors, however the view cannot be compiled successfully from SYS.
    Is there a known bug on creating views on external tables remotely?
    Thanks for any help!
    Tina

    I have been able to reproduce your error, using scott instead of sys, and resolve it, as demonstrated below. The combination that I found that worked consisted of having wh1 grant select on ext1 to scott explicitly and using set current_schema to wh1, so that ext1view did not require the wh1 qualifier.
    scott@ORA92> CREATE USER wh1 IDENTIFIED BY wh1
      2  /
    User created.
    scott@ORA92> GRANT CONNECT, RESOURCE TO wh1
      2  /
    Grant succeeded.
    scott@ORA92> CREATE OR REPLACE DIRECTORY er_admin_dir AS 'c:\er_init'
      2  /
    Directory created.
    scott@ORA92> CREATE TABLE wh1.ext1
      2    (table_name  VARCHAR2(100),
      3       column_name VARCHAR2(100))
      4  ORGANIZATION EXTERNAL
      5    (TYPE ORACLE_LOADER
      6       DEFAULT DIRECTORY er_admin_dir
      7       ACCESS PARAMETERS
      8         (RECORDS DELIMITED BY NEWLINE
      9          FIELDS TERMINATED BY ','
    10          MISSING FIELD VALUES ARE NULL)
    11       LOCATION ('file1.txt'))
    12  REJECT LIMIT UNLIMITED
    13  /
    Table created.
    scott@ORA92> CREATE OR REPLACE VIEW wh1.ext1view AS SELECT * FROM wh1.ext1
      2  /
    CREATE OR REPLACE VIEW wh1.ext1view AS SELECT * FROM wh1.ext1
    ERROR at line 1:
    ORA-06564: object ER_ADMIN_DIR does not exist
    scott@ORA92> CONNECT wh1/wh1
    Connected.
    scott@ORA92> @ LOGIN
    scott@ORA92> SET ECHO OFF
    GLOBAL_NAME
    [email protected]2
    wh1@ORA92> GRANT SELECT ON ext1 TO scott
      2  /
    Grant succeeded.
    wh1@ORA92> CONNECT scott/tiger
    Connected.
    wh1@ORA92> @ LOGIN
    wh1@ORA92> SET ECHO OFF
    GLOBAL_NAME
    [email protected]A92
    scott@ORA92> ALTER SESSION SET CURRENT_SCHEMA = wh1
      2  /
    Session altered.
    scott@ORA92> CREATE OR REPLACE VIEW ext1view AS SELECT * FROM wh1.ext1
      2  /
    View created.
    scott@ORA92> ALTER SESSION SET CURRENT_SCHEMA = scott
      2  /
    Session altered.
    scott@ORA92> SELECT * FROM wh1.ext1view
      2  /
    TABLE_NAME
    ---------------------------------------------------------COLUMN_NAME
    ---------------------------------------------------------tab1
    col1
    tab2
    col2
    scott@ORA92>

Maybe you are looking for

  • Safari 2.0.4 problems after sleep

    I've searched a bit for problems with Safari 2.0.4 after sleep and can't find much that relates to my specific problems so I'll ask for your help. On my Powerbook G4 15" when Safari is running and it goes into sleep mode I get the following problems:

  • To Gloss or not to gloss, that is the Question?

    I've been reading about the MBP 15" and have decided to get one, first thing monday morning, the only thing is- Should I get the glossy finish on the screen or not. I really don't know what the difference would be!. If anybody has seen or got both I

  • Startup Disk Full Error - Please help

    Dear ALL, I have started to notice recently that when I run Photoshop CS on my Mac OSX Tiger, I am getting the Startup Disk Full error message. I have no clue as to how to correctly fix this issue. I looked at my HD and I seem to have 32GB available,

  • Get weekday of DD/MM/YYYY

    I thought I'd almost got here with this script set ShotDate to do shell script "exiftool -s3 -DateTimeOriginal /Users/StudioA/Desktop/MJC_0025.JPG " log ShotDate set theYear to (characters 1 thru 4 of ShotDate) as text set theMonth to (characters 6 t

  • Can't install Photoshop CS6 on Lion (ASU has quit unexpectedly)

    Exit Code: 15 -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 1 error(s), 1 warning(s) ERROR: ASU has quit unexpectedly. WARNING: User opted to Cancel the install I tried to instal at 32bits m