Problem creating Database view

Hi ABAP experts,
I have created an ABAP database view with tables /SAPAPO/MATLOC, /SAPAPO/MATKEY and /SAPAPO/LOC.
I am taking snp planner (PLANNER_SNP) and ppds planner (PLANNER_PPS) from table /SAPAPO/MATLOC. I want their descriptions also in the same view which is there in an another database table /SAPAPO/PLANNER. but when i use this table in the join number of entries in the view appears to be zero. I dont know why..
Can anybody suggest me how can I put descriptions of SNP planner and PPDS planner also in the same view.
Also view is getting created with all the fields as key fields by default but I want only three feilds to be the key feilds.
Can anybody help in this matter.
Thanks a lot
Best Regards,
Chandan Dubey

I can't see the structure of these tables but apparently your join condition is not well done. Ensure foreing keys for /SAPAPO/MATLOC exist in /SAPAPO/PLANNER (or vice versa dependig on which table has primary key) . Try doing a view first only with these two tables, then if this works expand it to the two other tables. This will give you an overview were is the logic (relationship) problem.
As for your second question system will suggest key relationship, of which you can delete some relations. In this case you don't need to use all of them but only part of the key fields to be compared. Just select relationship you don't want and delete it. when using this view only these fields will be used to formluate join condition.
I hope this helps you
Marcin

Similar Messages

  • Problem in Database View  Creation

    Hi,
    I was creating a view on few base tables and need to build a datasource on that view to extract the current(Today's) data using a Remote cube onto a report. The selection to be used in the view is SY-DATUM. I could not give this value in the database view but when i am using the Maintanence view it says the cardinality is not established ie there is a problem with joins,i could not have all the required joins with base tables. But while creating database view i could get relations to all necessary base tables but only problem is using of SY-DATUM in selection condition of view.
    Could any one of you suggest some solution to overcome this.
    Thanks,
    Raju

    Siva,
    While creating the view, you mentiond the tables, right?
    Instead of mentioning the table name, mention the view name.
    Regards,
    Ravi
    Note : Please reward the posts that help you.

  • Creating Database Views at Runtime

    I want to create database views (on the fly) every time an ODI Package is executed. The views will be used as sources during step 2 of the Package. How can I create interface that will create these views that can be the first step in my Package? Would I need to create my own IKM that generates the views, so that datastore created can be used as a source in my next step in the package?

    When you create a OAMessageLovInputBean bean dynamically, it doesn't create all the default components which you see while creating through Jdev.
    You can create your own popup region and attach to bean through the setLovRegion API.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem creating a view

    I need some help with a query that I need to use in order to create a view.
    It's fairly complicated, at least for me.
    Here is a short summary of the problem:
    There is a table involved called salesperson.
    This table has a four digit salespersonid, lastname, firstname, hiredate, and supervisor columns.
    The supervisor column holds the four digit salespersonid of the supervisor of that particular sales person.
    This column is null if that salesperson is the supervisor.
    Now I need to generate a view that summarizes book sales by salesperson and shipping state.
    7 columns are required.
    Salespersonid
    Sales person Name
    State (based on shipstate)
    Total number of orders
    total amount of sales
    Total profit
    Last name of person's supervisor.
    It is that last one that is giving me fits.
    I don't know how to get the supervisor last name in the output.
    Also, if the salesperson is the supervisor (i.e. supervisor column is null) I need to display (none) there. It can't be blank.
    Here is what I have so far:
    SELECT s.salespersonid AS ID, s.lastname || ', ' || s.firstname AS salesperson, shipstate,
           COUNT(DISTINCT order#) AS "TOTAL ORDERS", SUM(retail * quantity) AS "GROSS SALES",
           SUM((retail - cost) * quantity) AS "PROFIT"
    FROM  salesperson s LEFT JOIN orders o ON s.salespersonid = o.salespersonid
    LEFT JOIN orderitems oi ON o.order# = oi.order#
    LEFT JOIN books b ON oi.isbn = b.isbn
    GROUP BY s.salespersonid, s.lastname || ', ' || s.firstname, shipstateIt seems to me that I have to use a self join but my brain is cooked, and I can't seem to figure this out.
    I have scripts here that would generate the tables and data I am using.
    It's a small database. (If anyone is familiar with Oracle 10g SQL by Joan Casteel it is the JustLeeBooks database used throughout that book)
    I don't really want to post these scripts here. It would make for quite a long post.
    There are seven of them to get the data consistent with what I am using here.
    If someone is willing to spend some time helping me, I could e-mail them the scripts.
    They are the script that sets up the initial database and then 6 more scripts I have written to get to this point.
    They kind of build on one another.
    Send me a private message if you are willing to do that.
    We could then bring the discussion back here if that is to your liking.
    Any takers?
    Maybe someone can help without those scripts?

    Hi..
    If i understood you need this query can help you..
    SELECT s.salespersonid AS ID, s.lastname || ', ' || s.firstname AS salesperson, shipstate,
           COUNT(DISTINCT order#) AS "TOTAL ORDERS", SUM(retail * quantity) AS "GROSS SALES",
           SUM((retail - cost) * quantity) AS "PROFIT",
           nvl(sup.lastname || ', ' || sup.firstname,'none') AS supervisor
    FROM  salesperson s LEFT JOIN orders o ON s.salespersonid = o.salespersonid
    LEFT JOIN orderitems oi ON o.order# = oi.order#
    LEFT JOIN books b ON oi.isbn = b.isbn
    LEFT JOIN salesperson sup ON s.supervisorid = sup.salespersonid
    GROUP BY s.salespersonid, s.lastname || ', ' || s.firstname, shipstate, nvl(sup.lastname || ', ' || sup.firstname,'none') Not Tested.
    Tell me if there is that you need !!!

  • Project Server Creating database views

    Hi All,
    We are using project server 2013. We need to create some database views to generate some complex report, what is the best way to create. I think if we create any custom views inside the project server databse, will be removed while applying the service pack.
    Thanks in advance, Taj

    Assuming you are talking for an On premise installation,
    You won't have problem if you create custom views within database as long as its referencing reporting objects, it is supported and documented on
    Technet
    Excerpt from Technet
    Schemas are documented only for the reporting tables and views.
    For an
    on-premises Project Server installation, you can add reporting tables
    and views for entities that are not defined in the Project database
    schema. You can also create separate databases for custom on-premises
    applications. Modification is not supported for the draft, published,
    and archive tables and views. Because the Project database is not
    directly accessible in Project Online, reporting tables and views cannot
    be modified. However, if you have a SQL Azure account, you can create
    separate databases for custom use with Project Online.
    Thanks | Sunil Kr Singh | http://epmxperts.wordpress.com

  • Problem creating a view in Administrator: 942: table or view does not exist

    Hi and thank you for reading,
    I am working with the Administration tool and would like to create a view in the physical layer. However I am getting the following error messages when I try to view the Date in the view:
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    I proceed as following:
    Right click on a physical schema (this schema is already created and works in Answers) -> new Physical Schema ->Table Type: Select -> Select * from Table_A where name='name' (Table_A is in the physical schema) -> OK -> Save -> Deploy -> Update Row count (works) -> View Data -> Error
    Any Idea what I am doing wrong. I have started with an easy select statement to test how to create a view in Oracle Administrator.
    Thanks a lot for any help
    Evgeny

    Do you see Table_A, and in which database schema?
    Try to put alias (database user) before table name.
    Select * from user.Table_A where name='name'
    Where user is database user.
    If you have Table_A in another user and connection pool is set to different user, then grant select from Table_A owner to connection pool user (make synonym for Table_A):
    Example (I'm using connection pool from userB and have tables from userA and userB).
    create or replace public synonym xx for userA.xx
    and
    grant select on xx to userB
    Hope this helps.
    Regards,
    Goran
    http://108obiee.blogspot.com

  • How to get access key while creating database view in R3

    Hi all experts,
    I am new to SAP so please forgive my ignorance.
    From R3, I am trying to create a new database view named ZVENDOR_ATTR  which will be based on LFM1.
    When i go to SE11 -> chose view and click create then it shows a pop up window that says "you are not registered as a developer. Please register in the Online Service System (OSS). In the OSS you will receive an access key."
    I don't know how can i get the access key and proceed now. Please note that i have installed this BW3.5 and R3 on my laptop. From the default user ddic, i have copied and created a new user 'sapuser1'. I am now using the sapuser1 to logon  and attempting to create the above mentioned Database view. It seems like this sapuser1 as it is copied from ddic is not a developer.
    So anybody can please help  how to create/get this access key to proceed  further.
    I will give full points. Please help.
    Thank you so much in advance
    ak

    Thanks All,
    Does it mean that i can not create any database object without the access key from service.sap.com? As i told that i installed this BW3.5 / R3 on my laptop to train myself but i don't have an account on service.sap.com.
    However i can login to R3 system as admin (i have access to the system using ddic or spcpic). Is there a way that a new user with deveoper role can be created by the admin without going to service.sap.com.
    Please advise.
    Thanks.
    ak

  • Create database view with Java Dictionary

    Hi,
    is there a possibility to create and deploy a database view with the
    Java Dictionary (in SAP NetWeaver Development Studio)?
    It seems as if you can only create and deploy database tables.

    or else, with prior versions, use somethinig like this...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7094c365-e8c4-2910-62b6-93712dd555d4

  • Creating Database view starting with m_z

    Hi,
    How to create a database view starting with m_z without using access key. Please help in this.

    Hi,
    You cannot create the Database view with namespace M_Z any custom objects should be created with Y/Z/ if you want to create the Objects using other than these namespace..you need have access key from SAP.
    You need to buy the Namespace from SAP to create the custom object M_Z*

  • Problems creating a view that's a union of two other views

    Hello all you Oracle folks,
    I'm pretty new to this Oracle thing, coming over from SQL Server where life was simple. Here's my issue;
    I am trying to create a view that is a union of two other views.
    I can run the top SELECT of this view (before the UNION) and it works no problem, and I can run the bottom SELECT (after the UNION) and it also works with no problem. I can run a DESC on both views involved, and those also work without any problem.
    When I try to run the SQL all together though, I get this;
    SQL> CREATE materialized view trkmaster.cmp_pmr_union refresh force ON demand AS SELECT 'CMR'
    2 "Ticket_System", "Id_col" "Ticket", "Submitter", "Submit_Date", "Submit_To",
    3 "Actual_Activity_Start_Date" "Start_Date", "Actual_Activity_Start_Time" "Start_Time",
    4 "Actual_Activity_End_Date" "End_Date", "Actual_Activity_End_Time" "End_Time",
    5 "Close_Date", "Risk_Level" "Level", "Activity_Type" "Type", "Activity_Category"
    6 "Category", "Hardware_Name" "Hardware", "Platform", "Application_Name" "Application",
    7 "Completion_Status" "Status", "Area_CMPO" "Owner", "Outage_Minutes" "Total_Outage_Mins",
    8 "Acorde_Downtime__in_minutes_" "Acorde", "Atlas", "Corporate_Email_Downtime"
    9 "Corporate_Email", "Data_Warehouse_Downtime__In_M6" "Data_Warehouse",
    10 "E__Commerce_Downtime__In_Mins_" "ECommerce", "FMDS__FIVR_" "FMDS_FIVR",
    11 "FMDS_Hotels_Downtime" "FMDS_Hotels", "FMDS_Internet_Downtime" "FMDS_Internet",
    12 "FMDS_Resv__Ctr_Downtime" "FMDS_Resv_Ctr", "GDS_Downtime__In_Mins_" "GDS",
    13 "HI_Online_Downtime__In_Mins_" "HI_Online", "Holidex__CRO____In_Mins_" "Holidex_CRO",
    14 "Holidex__Hotels____In_Mins_" "Holidex_Hotels", "Hyperion_Essbase",
    15 "IHGMail_Downtime__In_Mins_" "IHG_Mail", "Kofax_Downtime__in_minutes_" "Kofax",
    16 "PeopleSoft_Fin_Downtime_In_Mi1" "Peoplesoft", "PERFORM__HIRO____In_Mins_" "Perform_HIRO"
    17 FROM CMP.CHRQVCHANGE_MANAGEMENT_REQUEST UNION SELECT 'PMR' "Ticket_System", "Id_col"
    18 "Ticket", "Submitter", "Submit_Date", "Submit_To", "Problem_Start_Date" "Start_Date",
    19 "Problem_Start_Time" "Start_Time", "Problem_End_Date" "End_Date", "Problem_End_Time"
    20 "End_Time", "Close_Date", "Severity_Level" "Level", "Problem_Type" "Type",
    21 "Occurrence_Type" "Category", "Hardware_Name" "Hardware", "Platform", "Application_Name"
    22 "Application", "Close_Code" "Status", "Problem_Owner" "Owner",
    23 "TOTAL_Outage_Time__If_Any_" "Total_Outage_Time", "Acorde_Downtime__in_minutes_" "Acorde",
    24 "Atlas", "Corporate_Email_Downtime" "Corporate_Email", "Data_Warehouse_Downtime__In_M6"
    25 "Data_Warehouse", "E__Commerce_Outage_Time__Mins_" "ECommerce", "FMDS__FIVR_" "FMDS_FIVR",
    26 "FMDS_Hotels_Outage_Time__In_M5" "FMDS_Hotels", "FMDS_Internet_Outage_Time__Mi4"
    27 "FMDS_Internet", "FMDS_Resv__Ctr_Outage_Time__M3" "FMDS_Resv_Ctr",
    28 "GDS_Outage_Time__Mins_" "GDS", "HI_Online_Outage_Time__In_Min2" "HI_Online",
    29 "Holidex__CRO____In_Mins_" "Holidex_CRO", "Holidex__Hotels____In_Mins_" "Holidex_Hotels",
    30 "Hyperion_Essbase", "IHG_Mail_Outage_Time__In_Mins_" "IHG_Mail",
    31 "Kofax_Downtime__in_minutes_" "Kofax", "PeopleSoft_Fin_Downtime_In_Mi1" "Peoplesoft",
    32 "PERFORM__HIRO____In_Mins_" "Perform_HIRO" FROM PMR.CHRQVPROBLEM_MANAGEMENT;
    "PERFORM__HIRO____In_Mins_" "Perform_HIRO" FROM PMR.CHRQVPROBLEM_MANAGEMENT
    ERROR at line 32:
    ORA-00942: table or view does not exist
    The 'CMR' and 'PMR' as Ticket_System is me trying to assign a literal as a newly created column.
    All the data types match from one view to the other.
    If I switch around the SQL so the 'CMR' view is at the bottom and the 'PMR' view is at the top, it still errors out on the 'PMR' view as not existing, even though I can DESC it and run the SELECT using that view. A coworker thinks it could be some kind of view alias issue (?).
    I know the view exists, and I can access it no problem. Any ideas why this isn't working? It seems so simple, I could do this in a heartbeat in SQL Server. I have very few hairs left to rip out, so any help would be appreciated.

    SELECT 'CMR' "Ticket_System",
    "Id_col" "Ticket",
    ....you have wrapped up your columns with a double quotes and use an alias. i tried the same thing
    but using a different table and it does not work.
    SQL> desc emp;
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                    NOT NULL NUMBER(2)
    SQL> select "empno" "employee_number"
      2    from emp;
    select "empno" "employee_number"
    ERROR at line 1:
    ORA-00904: "empno": invalid identifier
    SQL> how were you able to run the top level of your SQL before the UNION clause? did you run it thru some tools
    other than SQL*Plus?

  • Problem creating materialized view

    OK, I'm totally new in using materialized views.
    I'm trying to create one and to make it refreshed on commit
    CREATE MATERIALIZED VIEW VK_CLIENT  build immediate refresh fast on commit AS
      select c1.code,
    c1.fiche fiche_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 'M. et Mme', c1.lnte ), c1.lnte ) lnte_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 
    decode( c1.lnte, 'M.', c1.libe, c7.libe ), c1.libe ), c1.libe ) libe_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 
    decode( c1.lnte, 'M.', substr( c1.libe, 1, c1.lgnom ), substr( c7.libe, 1, c7.lgnom ) ), substr( c1.libe, 1, c1.lgnom ) ), substr( c1.libe, 1, c1.lgnom ) ) nom_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 
    decode( c1.lnte, 'M.', initcap( substr( c1.libe, c1.lgnom + 2 ) ), initcap( substr( c7.libe, c7.lgnom + 2 ) ) ), initcap( substr( c1.libe, c1.lgnom + 2 ) ) ), initcap( substr( c1.libe, c1.lgnom + 2 ) ) ) prenom_1,
    decode( c1.sfam, '04', decode( c7.sfam, '04', decode( c1.lnte, 'Mlle', 'Mme', c1.lnte ), c1.lnte ), c1.lnte ) lnte_1_bis,
    c1.libe libe_1_bis,
    substr( c1.libe, 1, c1.lgnom ) nom_1_bis,
    initcap( substr( c1.libe, c1.lgnom + 2 ) ) prenom_1_bis,
    c1.sfam sfam_1,
    c1.dnai dnai_1,
    decode( to_char( c1.dnai, 'dd' ), '01', '1er', 
    decode( substr( to_char( c1.dnai, 'dd' ), 1, 1 ), 0, substr( to_char( c1.dnai, 'dd' ), 2 ), to_char( c1.dnai, 'dd' ) ) ) || ' ' || 
    rtrim( to_char( c1.dnai, 'month', 'nls_date_language = french' ) ) || to_char( c1.dnai, ' yyyy' ) dnai_fr_1,
    c1.horsfoyer horsfoyer_1,
    decode( c1.lnte, 'Mlle', 'f', 'Mme', 'f', 'M.', 'm' ) accord_1,
    c7.fiche fiche_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, c7.lnte ), c7.lnte ) lnte_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, c7.libe ), c7.libe ) libe_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, substr( c7.libe, 1, c7.lgnom ) ), substr( c7.libe, 1, c7.lgnom ) ) nom_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, initcap( substr( c7.libe, c7.lgnom + 2 ) ) ), initcap( substr( c7.libe, c7.lgnom + 2 ) ) ) prenom_7,
    decode( c7.sfam, '04', decode( c1.sfam, '04', decode( c7.lnte, 'Mlle', 'Mme', c7.lnte ), c7.lnte ), c7.lnte ) lnte_7_bis,
    c7.libe libe_7_bis,
    substr( c7.libe, 1, c7.lgnom ) nom_7_bis,
    initcap( substr( c7.libe, c7.lgnom + 2 ) ) prenom_7_bis,
    c7.sfam sfam_7,
    c7.dnai dnai_7,
    decode( to_char( c7.dnai, 'dd' ), '01', '1er', 
    decode( substr( to_char( c7.dnai, 'dd' ), 1, 1 ), 0, substr( to_char( c7.dnai, 'dd' ), 2 ), to_char( c7.dnai, 'dd' ) ) ) || ' ' || 
    rtrim( to_char( c7.dnai, 'month', 'nls_date_language = french' ) ) || to_char( c7.dnai, ' yyyy' ) dnai_fr_7,
    decode( c7.lnte, 'Mlle', 'f', 'Mme', 'f', 'M.', 'm' ) accord_7,
    initcap( decode( instr( lower( c1.adr1 ), 'log' ), '1', c1.adr2, decode( instr( lower( c1.adr1 ), 'bât' ), '1', c1.adr2, c1.adr1 ) ) ) adr1,
    initcap( decode( decode( instr( lower( c1.adr1 ), 'log' ), '1', c1.adr2, decode( instr( lower( c1.adr1 ), 'bât' ), '1', c1.adr2, c1.adr1 ) ), c1.adr2, null, 
    decode( instr( lower( c1.adr2 ), 'log' ), '1', c1.adr3, decode( instr( lower( c1.adr2 ), 'bât' ), '1', c1.adr3, c1.adr2 ) ) ) ) adr2,
    initcap( decode( instr( lower( c1.adr3 ), 'log' ), '1', null, decode( instr( lower( c1.adr3 ), 'bât' ), '1', null, c1.adr3 ) ) ) adr3,
    c1.ptt,
    c1.lcom,
    decode( c7.fiche, null, decode( c1.lnte, 'Mme', 'Madame', 'Mlle', 'Mademoiselle', 'M.', 'Monsieur', 'Monsieur' ),
    decode( nvl( c1.sfam, '07' ), '04', 
    decode( nvl( c7.sfam, '07' ), '04', 'Madame, Monsieur', 
    decode( c1.lnte, 
    'Mme', decode( c7.lnte, 'Mme', 'Mesdames', 'Mlle', 'Madame, Mademoiselle', 'M.', 'Madame, Monsieur', 'Madame, Monsieur' ), 
    'Mlle', decode( c7.lnte, 'Mme', 'Madame, Mademoiselle', 'Mlle', 'Mesdemoiselles', 'M.', 'Mademoiselle, Monsieur', 'Mademoiselle, Monsieur' ),
    'M.', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    '. ', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    decode( c1.lnte,
    'Mme', decode( c7.lnte, 'Mme', 'Mesdames', 'Mlle', 'Madame, Mademoiselle', 'M.', 'Madame, Monsieur', 'Madame, Monsieur' ),
    'Mlle', decode( c7.lnte, 'Mme', 'Madame, Mademoiselle', 'Mlle', 'Mesdemoiselles', 'M.', 'Mademoiselle, Monsieur', 'Mademoiselle, Monsieur' ),
    'M.', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    '. ', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    '-' ) ) ) lnte_long,
    decode( c1.cfam, null, c7.cfam, c1.cfam ) cfam,
    decode( c1.cfam, null, c7.allo, c1.allo ) allo,
    decode( c1.sexe, 'm', decode( c7.sexe, null, 'ms', 'm', 'mp', 'f', 'mp' ), 'f', decode( c7.sexe, null, 'fs', 'm', 'mp', 'f', 'fp' ), '-' ) accord,
    c9.fiche fiche_9,
    c9.lnte lnte_9,
    c9.libe libe_9,
    substr( c9.libe, 1, c9.lgnom ) nom_9,
    initcap( substr( c9.libe, c9.lgnom + 2 ) ) prenom_9,
    initcap( decode( instr( lower( c9.adr1 ), 'log' ), '1', c9.adr2, decode( instr( lower( c9.adr1 ), 'bât' ), '1', c9.adr2, c9.adr1 ) ) ) adr1_9,
    initcap( decode( decode( instr( lower( c9.adr1 ), 'log' ), '1', c9.adr2, decode( instr( lower( c9.adr1 ), 'bât' ), '1', c9.adr2, c9.adr1 ) ), c9.adr2, null, 
    decode( instr( lower( c9.adr2 ), 'log' ), '1', c9.adr3, decode( instr( lower( c9.adr2 ), 'bât' ), '1', c9.adr3, c9.adr2 ) ) ) ) adr2_9,
    initcap( decode( instr( lower( c9.adr3 ), 'log' ), '1', null, decode( instr( lower( c9.adr3 ), 'bât' ), '1', null, c9.adr3 ) ) ) adr3_9,
    c9.ptt ptt_9,
    c9.lcom lcom_9,
    decode( c9.lnte, 'Mlle' , 'Mademoiselle', 'Mme', 'Madame', 'M.', 'Monsieur', 'M. et Mme', 'Madame, Monsieur', null ) lnte_long_9,
    decode( c9.sexe, 'm', 'ms', 'f', 'fs', null, null, '-' ) accord_9,
    no.nbocc
    from client c1,
    client c7, 
    client c9,
    select z.code code,
    count(*) nbocc
    from client z
    where to_char( sysdate, 'yyyymmdd' ) between to_char( z.cdeb, 'yyyymmdd' ) and to_char( nvl( z.cfin, sysdate ), 'yyyymmdd' )
    group by z.code
    ) no
    where c1.code = c7.code (+)
    and c1.role = '1'
    and c7.role (+) ='7'
    and nvl( c7.horsfoyer (+), 0 ) = '0'
    and to_char( nvl( c7.cfin (+), sysdate ), 'yyyymmdd' ) >= to_char( sysdate, 'yyyymmdd' )
    and c1.code = c9.code (+)
    and c9.role (+) = '9'
    and to_char( nvl( c9.cfin (+), sysdate ), 'yyyymmdd' ) >= to_char( sysdate, 'yyyymmdd' )
    and c9.lnte (+) not in ( '. ', 'Assoc.', 'Ste' )
    and c9.lcom (+) is not null
    and c1.code = no.code (+);when doing so, I'm getting a ORA-12054:
    ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
    12054. 00000 - "cannot set the ON COMMIT refresh attribute for the materialized view"
    *Cause:    The materialized view did not satisfy conditions for refresh at
    commit time.
    *Action:   Specify only valid options.
    When I create the materialized view with just CREATE MATERIALIZED VIEW "H6801_GL_00"."VK_CLIENT" AS
    it works but the refresh is only "ON DEMAND"...
    Can't find how and why it won't work...
    Edited by: MacFizz on Dec 17, 2009 3:22 PM

    You could try the DBMS_MVIEW.TUNE_MVIEW and check if you can modify you materialized view or "refactor" it in a smaller, fast refreshable part that you could combine later to the sysdate/rownum part of it.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10821/advisor.htm
    Explanation on restrictions of fast refresh:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10706/repmview.htm
    Below there's an example of a fast refreshable mview, on creating the materialized view log and so on:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_6002.htm#i2080820

  • Problem creating database in RHEL3 using dbca

    I have installed oracle 9iR2 on RHEL3 and applied the patch 3006854
    but while installing installing Net Configuration Assistant was not installed it gave an error.
    now I am trying to create database using dbca but getting an error as
    ORA-12546:TNS:Permission denined.
    plz guide me in solving this problem

    At which step/stage in DBCA you get this error?
    You can try to dump out the creation scripts and run them manually see if you can get through.

  • Problem creating database during installation Oracle 8i

    Hi!
    When I was installing Oracle 8i a problem appeared. This problem was about Database creation, when the program of the Oracle installation was creating the database an error message was appeared : ORA-01034:ORACLE NOT AVAILABLE. I aborted the creation of the database and Oracle 8i was installed successfully.Now I'm trying to create the database with dbassist program but the same error is showed. Is there some solution?
    In addition, I'm installing Oracle 8.1.7 in a Sunblade 100 Sparc with Solaris 8.0.
    With best wishes, Jordi Carrasco.

    did you define the variable ORACLE_SID and ORACLE_HOME?

  • Problems creating Materialized View

    Hello,
    i have Problems with the creation of a materialized view with the following sql-statement:
         SELECT Tag_ID, ROWNUM AS RowNr
         FROM L_tag
         ORDER BY tag_id ASC
    in the table L_tag is only one column (tag_id) that contains all dates (1895.01.01 - 2020.01.01) as numbers (format like: 20020508)
    if i create the materialized view, no errors occures. if i check later the sql-statement of this materialized view, there is no ORDER BY!!:
         SELECT Tag_ID, ROWNUM AS RowNr
         FROM L_tag
    has anyone an idea, why oracle don't accept the order by clause?
    thanks,
    Dome

    has anyone an idea, why oracle don't accept the order by clause?Yes, because Oracle stores data in an unorderred fashion (except for IOT, but that's different matter). So your ORDER BY clause makes no sense for stored data.
    You must use ORDER BY when doing the final select from the MV (...).
    Regards,
    Yoann.

  • Having problem creating Database on Oracle8i installed on a stand alone NT 4.0

    Hi,
    I have installed Oracle 8i Enterprise Edition on my stand alone Windows NT4.0 work station (Service Pack 3). After installation, it tries to create a sample database and just hangs there. I also tried aborting it and creating it using "Database Configuration Assistant" and still facing the same problem. It doesn't show any error but just hangs indefinitely at the database creation menu. I observed that the listener is not running.
    Kindly let me know if there are any precautions to be taken while installing a Oracle 8i on Stand alone Windows NT. My NT is NOT CONNECTED to any network. Also, let me know how I can create a database when listener is not running.
    Regards,
    Sheshachala

    I installed 816 EE on my home NT40 workstation without any troubles. Please make sure that you've suttisfied all installation requirements as written in the Installation Guide.Install other version of Servis Pack. I am usinn SP6. Alo you can try to copy a sample database from cd without creating it
    Yours.

Maybe you are looking for

  • Why doesn't "$_SERVER['PHP_SELF']" in action= work for me.

    I'm trying to make a form "self post", and was referred to the explanation at www.html-form-guide.com.  I coded my page exactly as shown there, and even copied/pasted the action= code (simple as it is) to my form tag. In my XAMPP test environment the

  • Db link in trigger causes compilation error

    Using Forms 10.1.2.0.2 Post-Query trigger BEGIN SELECT item_desc INTO :block1.item_desc FROM items@database100 WHERE item_code = :block1.item_code; EXCEPTION WHEN NO_DATA_FOUND THEN item_code := 'No description for this item'; END; Compilation error

  • Create Parameter in Smartforms Interface table tab signed as local type

    Error Message: Form Interface     Only table types may be used as the reference type for a table parameter What I did: I have created a table in <i>tables tab</i> of <b>Form Interface</b> like this: Parameter Name: IT_1 Type Assignemnt: TYPE Associat

  • Automator vs QuicKeys

    Back in my System 7 and System 8 days, I relied on Connectix's QuicKeys to do certain tasks and was reasonably adept at putting together scripts for it. When I recently started to mess around with Automator, I found some essential (to me, at least) f

  • More information about additional human workflow task methods needed

    The typical human workflow task only uses the initiate method of the Task service, although there are many methods available. I would like to have my BPEL process reinitiate or renew a task if not completed properly or not approved by a separate task