Check query used to create system views

Hi Group,
I would like to know if there is any way to check the TSQL query used by SQL to create system views. I know for user created views, you can open it in Designer or script the view. Use SQL 2012 as an example when selelcting the top 1000 records no underlyng
query is visible.
Thanks and Regards,

You can see most of them using sys.all_objects and sys.system_sql_modules.  For example
select o.name, m.definition
from sys.system_sql_modules m
inner join sys.all_objects o on m.object_id = o.object_id
where o.name = 'dm_exec_requests'
Be very careful that you don't ever run the code that creates the view.  There are additional tricks behind the scene that give some system views special actions.  So if you run the code, your code might not work the same way as the original system
view.
Also, anything which is not documented can be changed by Microsoft at any time.
Tom

Similar Messages

  • Query Issue in Creating a View....Please help me with this query..

    I would like to create a view on this table with four columns
    1. PN#_EXP_DATE
    2. PN#
    3. PN#_EFF_DATE
    4. PN#
    P_S_C     A_C     P     EXP_DT
    21698     13921     1     5/29/2009 3:15:41 PM     
    21698     13921     1     5/29/2009 3:54:57 PM     
    21698     1716656     4     5/29/2009 3:15:41 PM     
    21698     3217     3     5/29/2009 3:15:40 PM     
    21698     3217     3     5/29/2009 3:54:57 PM     
    21698     60559     2     5/29/2009 3:15:41 PM     
    21698     60559     2     5/29/2009 3:54:57 PM     
    I have a trigger on A, which inserts the DML records into B. (Table A and B structure is the almost the same,
                                       where table B will have one extra column exp_dt)
    NOw Table B can have records with same P_S_C and A_C columns and exp_dt will capture the history.
    for example: from the above sample data, let us take first two records..
    P_S_C     A_C     P     EXP_DT
    21698     13921     1     5/29/2009 3:15:41 PM     --- Record 1
    21698     13921     1     5/29/2009 3:54:57 PM     --- Record 2
    from this..
    Note: 1. Table A and Table C can be joined using A.P_S_C and C.R_C to get the start_date.
    2. PN# comes from table D. It contains numbers for the resp. weeks.
    3. PN#_EFF_DATE is the previous immediate previous date for that record in history table (Table B).
    I wanted the data like..
    ---- this is for the second record in the above..
    PN#_EXP_DATE PN# PN#_EFF_DATE PN#
    5/29/2009 3:54:57 PM     214 5/29/2009 3:15:41 PM     214
    ---- this is for the first record in the above..
    PN#_EXP_DATE PN# PN#_EFF_DATE PN#
    5/29/2009 3:54:41 PM     214 ( for this we should query the table C to get the
                        start_date, for this combinatation of P_S_C and A_C in table B
                             where B.P_S_C = C.A_C
                             and that value should be the EFF_DT for this record)
    Please help me with this....
    Thanks in advance..

    Hi All,
    select d.P# as "PN#_EXP_DATE", exp_date
    from daily_prd d, cbs1_assoc_hist b
    where to_char(d.day_date,'MM/DD/YYYY') = to_char(b.exp_date,'MM/DD/YYYY')
    and d.period_type = 'TIMEREPORT';
    This above query gives the output as follows:
    pn#_exp_date exp_date
    214     5/29/2009 3:15:40 PM
    214     5/29/2009 3:15:41 PM
    214          5/29/2009 3:15:41 PM
    214          5/29/2009 3:15:41 PM
    214          5/29/2009 3:54:57 PM
    214          5/29/2009 3:54:57 PM
    214          5/29/2009 3:54:57 PM
    This below is the data from history table (Table B).
    P_S_C     A_C PLACE EXP_DATE
    21698          3217          3     5/29/2009 3:15:40 PM     
    21698          13921          1     5/29/2009 3:15:41 PM     
    21698          1716656          4     5/29/2009 3:15:41 PM     
    21698          60559          2     5/29/2009 3:15:41 PM     
    21698          13921          1     5/29/2009 3:54:57 PM     
    21698          3217          3     5/29/2009 3:54:57 PM     
    21698          60559          2     5/29/2009 3:54:57 PM     
    I got the pn#_exp_date from the Table 'D', for the given exp_date from Table B.
    My question is again....
    CASE - 1
    from the given records above, I need to look for exp_date for the given same P_S_C and A_C.
    in this case we can take the example...
    P_S_C     A_C PLACE EXP_DATE
    21698          3217          3     5/29/2009 3:15:40 PM
    21698          3217          3     5/29/2009 3:54:57 PM
    In this case, the
    pn#_exp_date exp_date     pn#_eff_date eff_date
    214     5/29/2009 3:15:57 PM     < PN# corresponding to the     5/29/2009 3:15:40 PM
                        eff_date .>
                        <Basically the eff_date is
                        nothing but the exp_date only.
                        we should take the immediate before one.
    In this case, our eff_date is '5/29/2009 3:15:40 PM'.
    but how to get this.
    CASE - 2
    from the above sample data, consider this
    P_S_C     A_C PLACE EXP_DATE
    21698     1716656     4     5/29/2009 3:15:41 PM
    In this case, there is only one record for the P_S_C and A_C combination.
    The expected result :
    pn#_exp_date exp_date               pn#_eff_date eff_date
    214     5/29/2009 3:15:41 PM     < PN# corresponding to the     5/29/2009 3:15:40 PM
                        eff_date .>
                   <Basically the eff_date is
                   nothing but the exp_date only.
                        we should take the immediate before one.
    In this case to get the eff_date, we should query the Table 'C', to get the eff_date, which is START_DT column in this table.
    for this join B.P_S_C and C.R_C.
    Hope I am clear now..
    Thanks in advance.....

  • Using own created system status

    Hi,
    my customer doesn't want to use user statuses and I have created a new system status instead and assigned it to the object type using the transactions BS12 and BS22.
    But now I have the problem that this new system status is not visible as an available status neither in the transaction I want to use it (CRM_MKTPL) not in the status simulation in BS12.
    If I set this newly created system status as the initial status it is visible!
    For me it seems that the information is missing which system status is allowed to be set after a previous status.
    I could not find a place where I can do such a configuration.
    Does anybody knows where this setting can be done or do we have to do some additional coding.
    Thanks and kind regards
      Michael

    Probably answer not expecting any more, but maybe as a help for other users
    If the open status is set as an initial status, you must in BS22 transaction, for this open status, set 'allowed' for your new system status.

  • What is the use for CREATING VIEW WITH CHECK OPTION?

    Dear Legends,
    I have a doubt
    What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.
    A: Enforcing constraints at DB level.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???
    Please clear my doubt's Legends
    Lots of Thanks....
    Regards,
    Karthik

    Hi, Karthick,
    karthiksingh_dba wrote:
    ... What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..Most views are created and used for convenience. A view is a saved query. If the same operations are often done, then it can be very convenient to code those operations once, in a view, and refer to the view rather than explicitly doing those operations.
    Sometimes, views are created and used for security reasons. For example, you many want to allow some users to see only certain rows or certain columns of a table.
    Views are necessary for INSTEAD OF triggers.
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.The reason is integrity, not necessarily referential integrity. The CHECK option applies only when DML is done through the view. It prohibits certain changes. For example, if a user can't see certain rows through a view, the CHECK option keeps the user from creating such rows.
    A: Enforcing constraints at DB level.I'm not sure what you mean. Please give an example.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??No. Using CHECK OPTION, you can do some inserts and updates, but not others. The columns involved may or may not have constraints in either case.
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???If you try to violate a constraint, you'll get an error. That happens in views with or without the CHECK OPTION, and also in tables.

  • Creating ALV view system-level assignment

    Hi!
    When I press "Save as.." in the settings window of an ALV, I can only save the view with assignment "User".
    But I want to create system view available to all users. Like views with "/view_name" in usual ALV.
    Is it possible to create such view and make it default to all users?

    Just run the application in Administrative Mode (Assuming you have the correct authorizations to do so).  From SE80 you can do this if you double click on the Web Dynpro Application to bring up the Application Edit.  Then choose Web Dynpro Application->Test->Execute in Administrative Mode From the top level menu bar. You can also use the URL parameter sap-config-mode=X.
    When you save the variant you will be saving a global one and will have the option to place your variant in a transport.

  • Creating Materialized View in Toad

    As with every new endeavor - come new questions.
    I am trying to create a materialized view via toad (first time doing this). Now - toad is great, since it provides a kind-of wizard interface. Hence, one doesn't have to completely code in the create statement, with all of the options, etc.
    Instead, in toad, one can (via the schema browser), go into the Materialized Views tab and click on create new. This opens a window with 6 tabs: Basic Info, Refresh Info, Physical Attributes, Query, Partitions & Subpartition Template.
    In the Basic Info, one can put a check mark next to some of the following options:
    -Build Deffered
    -Parallel
    -Cache
    -Logging
    -Using index
    -Allow updates
    etc.
    I have read that build deferred refers to whether or not you would like the view to be created automatically or to be deferred.
    Anyways, I tried to find Toad documentation to explain each of the options in-detail. No success. Hence, am researching each part piece by piece.
    But - here is my question:
    In the Query tab, we are asked to specify a query. I am assuming that the query does not have to be a full query, beginning with CREATE MATERIALIZED VIEW mv_table1 REFRESH FAST etc...
    Since in this 'wizard', we are providing the MV name at the top of the dialog box, we are checking the 'options' in the other tabs, etc.
    And so, I assumed that the query should merely be a select query in the window mentioned above.
    So I entered the following:
    select * from table1@remote_db;
    When I go to verify the syntax, I get the error message: ORA_00911: invalid character. It seems to be pointing to my db_link (remote_db). I have been using this link throughout many places, w/o any problems.
    Has anyone created a MV in toad before? Any links to good toad documentation would be helpful as well.
    Thanks.

    (This is fun... ;))
    For anyone endeavoring this in the future, below I have attached the prerequisites required in order to create a materialized view (can also be found @ http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm):
    Prerequisites
    The privileges required to create a materialized view should be granted directly rather than through a role.
    To create a materialized view in your own schema:
    You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
    You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a materialized view in another user's schema:
    You must have the CREATE ANY MATERIALIZED VIEW system privilege.
    The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database) and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a refresh-on-commit materialized view (ON COMMIT REFRESH clause), in addition to the preceding privileges, you must have the ON COMMIT REFRESH object privilege on any master tables that you do not own or you must have the ON COMMIT REFRESH system privilege.
    To create the materialized view with query rewrite enabled, in addition to the preceding privileges:
    If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
    If you are defining the materialized view on a prebuilt container (ON PREBUILT TABLE clause), then you must have the SELECT privilege WITH GRANT OPTION on the container table.
    The user whose schema contains the materialized view must have sufficient quota in the target tablespace to store the master table and index of the materialized view or must have the UNLIMITED TABLESPACE system privilege.
    When you create a materialized view, Oracle Database creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle Database uses these objects to maintain the materialized view data. You must have the privileges necessary to create these objects.

  • Create mat view

    Database version = 10.2
    I have a materialized view called BENEFIT_MAT_VIEW. All I have is sqlplus. How do I find out the CREATE MATERIALIZED VIEW DDL statement that was used to create this view ?

    Example :
    TEST@db102 SQL> set long 100000
    TEST@db102 SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW','MV_EMP','TEST')
      2  from dual;
    DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV_EMP','TEST')
      CREATE MATERIALIZED VIEW "TEST"."MV_EMP"
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG
    GING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      BUILD IMMEDIATE
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      REFRESH FORCE ON COMMIT
      WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT
      DISABLE QUERY REWRITE
      AS SELECT empno,ename
    from emp
    TEST@db102 SQL>                                                                                

  • SAP QUERY using ASSHR and ASSOB tables

    We currently have SAP query that reports on additional payments (Info type 0015).  The user wants to report the cost center held on the cost assignment (Tables ASSOB and ASSHR).
    The existing query uses infoset created using PNP logical database. 
    How do I add or join the ASSOB and ASSHR tables to Info type 0015 to report the cost center?
    Thanks in advance
    Shamshudin

    Hi Sham
    You may need to create custom fields in the infoset and create some code to pull out and display details from ASSHR and ASSOB corresponding to the ifnotype record.

  • 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

  • Include or create a view in the database and use this view?

    Well, I need to get related data of the main table from another related tables, so one way to do that is to use the Include method in Entity Framework to get this related data.
    However, I am thinking in another option, create a view in the database and use this view in entity framework. In this way, I avoid the needed of the include, because I think that is expensive in resources. But I am no very sure about that.
    I would like to know if the use of views on entity framework is a good idea to improve the performace or is better to use the include.
    For example, if I use the include I have the advantage that I get only one the main record and all the related data I have in the navigation properties, so the info is more shorted.
    Which is the advanteges and disadvantages of both methods to get related data in entity framework?
    Thank so much.

    Hello ComptonAlvaro,
    >>I would like to know if the use of views on entity framework is a good idea to improve the performace or is better to use the include.
    If your view would use a Join syntax to query master-child relationship tables, it actually is similar with the Include() method which actually results a duplicate records from master table, you could check this
    link for detail description.
    >>Which is the advanteges and disadvantages of both methods to get related data in entity framework?
    One visible difference is that records from Views are not editable by default(if you want edit them, you could refer to this
    blog).
    In your case, my suggestion that you could use the lazying load which will load the matter table once and disable the trace if you only need to display data.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Why can't I use the "Company Name" of the lead entity for System Views?

    I just wanted to add a new colum for the system view "All Leads". As i scrolled through i missed the field "company name". So i checked the systemname of the field and it was the same. I got back to the Views and tried to change another
    existing view and the same there: the field company name was not accessible. 
    So to proof that there is something wrong I created a new view for leads. In the new view i can choose the field company name and use it as expected. 
    So whats the reason i cant use it for existing views? It makes no sense at all!
    Greetz

    Hi Everyone,
    This issue exists in CRM 2015 as well.
    Now it is really frustrating as this issue started occurring from
    CRM 2013 and still its not yet fixed.
    Does anyone has any idea that when this issue will be fixed by Microsoft ?
    Thanks,
    Ravi

  • 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.

  • Creating a view and use the view in a model

    Hi All,
    I am new to OBIEE and i have a requirement that i have two fields to be added to a subject area. Since we can't add queries directly to a model, i have to create a view and then put the query in it and then use the view in that model.
    I couldn't understand this much, if anybody could help me explaining in detail about the views and adding a query in it?
    Thanks
    Gohan

    Hi,
    Please refer the screen short below link
    http://imgur.com/b9sXS
    Right click any of one physial table(RPD physical layer) -> Select Properties -> from the properties windows choose 'Select' as Table type ->
    Please enable feature 'CREATE_VIEW_SUPPORTED' view just go to 'Features' tab and from the available option select 'CREATE_VIEW_SUPPORTED' is checked or not. If it is not checked then check the option.
    can you explain your current model and scenario?
    for example to you can use to fetch two fields from Subqueries,all trypes of joins(inner,left outer,right outer etc..,) its upto you case
    e.x:fetching two tables columns mapping subquery:
    SELECT column1, column2 FROM table1 WHERE column1 IN (SELECT column1 FROM table1
    INTERSECT SELECT column1 FROM table2 )
    SELECT column1, column2 FROM table1,table2 WHERE table1.column1 = table2.column1
    Alternative there is feature call "mulitple subject area" method will work (Union,Union all etc..,)
    Thanks
    Deva
    Edited by: Devarasu on Jun 6, 2012 4:40 PM

  • Download parameter using HR create Standlone query Intergrator.

    I have created a view and i need to restrict the download based on some parameters.
    Now when i use HR create Standlone query Intergrator i know i can add a max of 5 paramaters.
    below are few questions:
    i need all 5 paramters but how do i define them using this integrator.I added 1 parameter and it works absolutely fine and restricts the dwnld based on this paramater.For eg i used parameter DOJ equals ---Input the doj and the view downloaded the data whose DOJ is exactly the same as what was inputted.
    Syntax used in where clause : wherre DOJ=$PARAM$.DOJ .
    Now i need to add second paarmeter in the same ADI how do I do that will i have to define the where clause again or just in the same intergrator i can give second parameter name. I tried this as well and when trying to upload i got the error as below :
    PER PER_289713_ADI_INVALID_PARAM : SQL does not contain all bind variables. Please check your input values and try again.
    Second qns , i used again the same HR create Standlone query Intergrator and enter valu e in where clause now i need location as well to restrict the dwnld including the DOJ. syntax : where location =$PARAM$.LOCATION and given the prompt name and type in second parameter as first parameter is alareday occupied by DOJ. the row got uploaded succesfully.now wen i try to run my report i get both the dwnld parmater DOJ ,Location.Input the value in DOJ and then in location it gives me following error whn i try to input location for eg :Hyderabad (NOTE :type i had defined is VARCHAR2 and then why below is coming)
    Error: Form validation Failures Value Hyderabad "Location" is not number.
    After this leaving Blank as location field i try to create documnet and it throws me error whie downloading records as below and none of the records is dwnlded.
    error :Error occurred when setting bind value null on SQL Statement at index 1
    PLEASE LET ME KNOW AS HOW CAN I DEFINE ALL FIVE PARAMTERS FOR A SINGLE VIEW AND RESTRICT MY DOWNLOAD.

    DECLARE
    ln_number NUMBER := 1;
    BEGIN
    BNE_PARAM_DEFNS_PKG.UPDATE_ROW (
      X_APPLICATION_ID => 800,
      X_PARAM_DEFN_CODE =>'PER_BUS_GRP_ID',
      X_OBJECT_VERSION_NUMBER => ln_number,
      X_PARAM_NAME => 'PER:BUS_GRP_ID',
      X_PARAM_SOURCE =>'HR:Download',
      X_PARAM_CATEGORY => 5,
      X_DATATYPE =>1,
      X_ATTRIBUTE_APP_ID => NULL,
      X_ATTRIBUTE_CODE => NULL,
      X_PARAM_RESOLVER => NULL,
      X_DEFAULT_REQUIRED_FLAG => 'N',
      X_DEFAULT_VISIBLE_FLAG =>'Y',-- changed from 'Y' to 'N'
      X_DEFAULT_USER_MODIFYABLE_FLAG =>'Y',
      X_DEFAULT_DATE => NULL,
      X_DEFAULT_NUMBER => NULL,
      X_DEFAULT_BOOLEAN_FLAG => NULL,
      X_DEFAULT_FORMULA => NULL,
      X_VAL_TYPE => 2,
      X_VAL_VALUE =>'XXC_HR_ALL_BG',
      X_MAX_SIZE => 240,
      X_DISPLAY_TYPE => 3,
      X_DISPLAY_STYLE =>1,
      X_DISPLAY_SIZE => 240,
      X_HELP_URL => NULL,
      X_FORMAT_MASK => NULL,
      X_USER_NAME => 'APPS',
      X_DEFAULT_STRING => NULL,
      X_DEFAULT_STRING_TRANS_FLAG =>NULL,
      X_DEFAULT_DESC => NULL,
      X_PROMPT_LEFT => 'Business Group Name',
      X_PROMPT_ABOVE => 'Business Group Name',
      X_USER_TIP => 'Enter Business Group Name',
      X_ACCESS_KEY => NULL,
      X_LAST_UPDATE_DATE => SYSDATE,
      X_LAST_UPDATED_BY => -1,
      X_LAST_UPDATE_LOGIN => -1
    dbms_output.put_line('Value of Object Version Number is : '|| ln_number);
    exception
    when others then
    dbms_output.put_line(SQLERRM);
    end;Edited by: 936671 on Jul 4, 2012 10:51 AM

  • I created webdynpro view then i want to export to sap portals using SLD CON

    hi
    every body
    i created WebDynpro views in NetWeaver dev studio
    then i want to export to sap portals i have to use
    SLED CONFIGURATION what are all step required can
    post to me and aloes step to configure in visual administrator and JCo connections
    bee

    hi
    check out this weblog for SLD configuration
    /people/sugree.phatanapherom/blog/2005/08/14/configuring-sld-in-sneak-preview-sap-netweaver-04-sneak
    or
    Do the following
    SLD (System Landscape Directory) CONFIGURATION on J2EE Server.
    http://host:j2ee_port/sld
    Enter Administrator user name and password.
    Go to Administration -> Server Settings
    Make sure that the SLD server is stopped
    Enter the following Server Parameters
    Object Server:
    <Host name of the J2EE server>
    Working Directory:
    The working directory of the System Landscape Directory.
    The standard path is "/usr/sap/<SAPSID>/SYS/global/sld"
    Click on SET.
    Select the following parameter for Persistence
    Persistence: Database
    Click on SET.
    Leave ABAP Connection Parameters Blank.
    Go back to Administration.
    Click on Data Supplier Bridge
    Configure the data supplier bridge with following parameters.
    Update local SLD (sld/active): TRUE
    RFC Gateway:
    Server : <host name of J2EE server>
    Service : <The SAP gateway service port>
    Click on SET.
    Open Administration Tool for J2EE server from following Location.
    C:\usr\sap\<SID>\JC<instance number>\j2ee\admin\go.bat
    Select Default and Click on Connect.
    Enter password for Administrator.
    Click on Connect.
    Select Cluster->Server->Services->SLD Data Supplier
    Select http setting tab page and enter following details.
    Host: <host name of J2EE server>
    Port: <Port Number of J2Ee Server>
    User: <Administrator User>
    Password: <Password for Administrator User>
    Use https? : <Check this if you want to use https>
    Trust Store: <leave default i.e. TrustedCAs>
    Click on SAVE.
    Select RFC Settings tab page and enter following details.
    Gateway Host : <host name of J2EE server>
    Gateway Service/Port: sapgw<instance number>
    Click on SAVE.
    Restart the SLD data Supplier Service.
    After the SLD is configured.
    go to the path.
    http://<hostname>:50000/webdynpro/welcome.
    go to your application.
    click on the application. on the right hand side you can see you logical systems.
    create the JCO connection going through that steps.
    Deploy you application on to portal from NWDS and run your application.
    Regards,
    Gopi

Maybe you are looking for

  • How to translate into English Apple China support page joke for non-Chinese

    In China there are many thousands of English speaking non-Mandarin/Cantonese inhabitants amongst the billion+ natives - it would be very prudent of Apple to support cultural foreigners with an English alternative radio button or two on Chinese web pa

  • Could Not Proxy For User

    I try to use Methods Proxy from the Object API, but I got this error : "Could Not Proxy For User", my client version is 7.0.3 . With the Novell Groupwise Client I can access to the proxy account. Any idea of what to do to fix this problem ?

  • Common log file name for ESB

    What is the log file name which is logging all the informations of ESB?

  • Problem with *.deploy files

    I got a problem with my *.deploy files. My main .deploy file assemble two files : ejbs.deploy and servlets.deploy. Whenever I change the “Files“ property in ejbs.deploy or the “WEB-INF/classes” property in servlets.deploy from within JDeveloper, it w

  • Can someone definitively confirm the backing on the Playbook, if it's rubber/latex free?

    Hello, Have sent this in an email to RIM support, but thought I'd ask the board as well. Basically have family with SEVERE rubber/latex allergy.  I just bought a playbook and noticed the backing smells a LOT like rubber, but I find it hard to believe