Solved: ORA-20001: get_dbms_sql_cursor error ORA-01445: cannot select ROWID

I got an error, googled it and couldn't find a good answer. Joe Fuda helped me to fix the problem. Here is the answer for future google results.
Error:
ORA-20001: get_dbms_sql_cursor error ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
Query that triggered the error:
SELECT
p.rowid
, p.product_id
, p.product_type
, p.product_name
, p.product_description
FROM
product p
, link_release_product rp
WHERE
rp.release_id = 1
AND
p.product_id = rp.product_id
This is casued by the keyword "rowid".
The same error occurs if 'p.rowid' is replaced with 'p."ROWID"'.
You can replicate this error in SQL Command by adding wrapping the query with 'select * from ( [the query] )'
Fix:
Add an alias to 'p.rowid' so the query is now like:
SELECT
p.rowid product_rowid
, p.product_id
, p.product_type
Reason:
Unclear, it might have something to do with how APEX does pagination.

ok, found the answer... it has to do with the single row view issue addressed in this thread... ORA-01446 on Interactive query
(sorry if there's a better way to link to other threads in this forum).

Similar Messages

  • IR Report Search - ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression

    Hi All,
      I had created a IR report based on a table and it was working with no issues.  But after few days, when I try searching using the IR search bar it shows "ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression" error message. I don't see any debug messages or errors in the debug window. The Finder drop down is empty too, there are no columns displayed to filter.
    When I recreate the IR report(new page) based on the same table, It works fine and there are no issues with the search.  But the old IR report search doesnt work. I have not modified the any thing in the old report after initial creation. Report uses Primary key based on a sequence.
    What might have caused this issue?
    Is there a way to intercept the search query from IR report?
    Apex version - 4.2.3.00.08.
    Any help on this appreciated.
    Thanks,
    Jagan

    Hi MK, as I had mentioned in my post, I don't see any logs in the debug window, query tab.
    Can you please guide me how to check the query logs on search?
    Thanks,
    Jagan

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • IR: ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier

    Hi everyone,
    has anyone else had this error which has been driving me round the bend during the last three days?
    I have an interactive report which used to work fine.
    Now it happens (when the page loads/a filter is en- or disabled) that - from time to time, but unpredictable - I receive
    ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier
    The report is based on a table function.
    I will try to set up a testcase and post the link here, but so far I haven't managed to force the error to occur.
    But maybe someone else has already bumped into this kind of error? I would be grateful for any hints!
    Best regards,
    Sabine
    Application Express 4.1.0.00.32
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Hi Jari,
    I changed the type definition (the return type of the table function) and extended the select list in the source of the IR.
    I do not use 'select *' but reference every column explicitly. So APEX easked me whether to add the new column.
    I also tried deleting in recreating the region, but no luck.
    Any more ideas?
    Best regards,
    Sabine

  • What causes "ORA-01445: cannot select ROWID from" error

    While executing a SELECT query i got this error:
    ORA-01445: cannot select ROWID from, or sample, a join view without a
    key-preserved table
    Below mentioned is the join condition part of the query. The line which the error has occured is italicized
    from checkout_hdtl ch
    inner join pmt_htl ph on ph.post_ln_a = ch.post_ln_code
    inner join pin_dls pd on pd.post_ln_a = ph.post_ln_code
    inner join carton_dtl cd on cd.carton_nbr = ch.carton_nbr
    and cd.lseq_nbr = pd.lseq_nbr
    inner join invoice_module im on cd.invevt_code = im.inv_code
    inner join item_dock_master del on nm.invent_code = iwm.inv_code
    left outer join inv_curr_comm_code mnb on ium.invent_code = im.inv_code
    and icc.cntry = ph.shipto_cntry
    left outer join vw_ver_master vw on vw.del_rec = ch.del_rec
    left outer join cmd code_entry on code_pi.cntry =
    cd.code_entry where ch.shpmt_nbr = '3'
    What do i do?

    I would rather use Notepad than store my data in SQL server. It just so happens that our product is released for SQL Server as well. Hence i did the testing.
    >Is there a limit to the number of joins that can be performed in Oracle?
    Wrong question as it does not have anything to do with the number of views.. it has everything to do with the ability to correctly identify the unique row. Re-read the error message details posted by Blu - it explains the error.As you can see from my post, i created a table using the(CTAS) SELECT query from the View vw_ver_master's definition. So the view's result set is now stored in a table and now there are only tables involved in these JOINS.
    The query will succeed if i comment out ANY one of these JOINS in this statement. This is so weird.
    I

  • ORA-01445: cannot select ROWID from, or sample, a join view without a key-p

    Hi All,
    I am facing issue with one sql query. It is giving me error:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    I am not getting any clue to solve this. On internet, i didn't find proper reason for this error and troubleshooting way and solution for this error. Everywhere i saw one sentence, "Key preserved means the row from the base table will appear AT MOST ONCE in the output view on that table" but it didn't solve my problem.
    I have 1099 columns in one select query. so avoiding the actual column list in select clause. Instead I am trying to select ROWIDs from all tables in join. My understanding is ROWID is a unique identifier in table not in database. But though I remove ROWIDs, I get same error. So please don't bother about these ROWIDs.
    SELECT
    TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD')
    ,FACT.ROWID AS ABC1
    ,FACT_ADJ.ROWID AS ABC2
    ,DIM_SEC.ROWID AS ABC3
    ,DIM_SEC_ADJ.ROWID AS ABC4
    ,DIS_CAT.ROWID AS ABC5
    ,CTRY.ROWID AS ABC6
    ,BCP.ROWID AS ABC7
    ,STAGE.ROWID AS ABC8
    FROM FACT_POSITION FACT
    LEFT JOIN FACT_POSITION_ADJ FACT_ADJ ON FACT.POSITION_PKID = FACT_ADJ.POSITION_FKID
    LEFT JOIN DIM_SOURCE_SYSTEM SOURCE ON FACT.SOURCE_SYSTEM_FKID = SOURCE.SOURCE_SYSTEM_PKID
    LEFT JOIN DIM_SECURITY DIM_SEC ON FACT.SUBSYS_SECURITY_FKID = DIM_SEC.SECURITY_PKID
    LEFT JOIN DIM_SECURITY_ADJ DIM_SEC_ADJ ON FACT.SUBSYS_SECURITY_FKID = DIM_SEC_ADJ.SECURITY_PKID
    LEFT JOIN DIM_DISCLOSURE_CATEGORY DIS_CAT ON FACT.DISCLOSURE_CATEGORY_FKID = DIS_CAT.DISCLOSURE_CATEGORY_PKID
    LEFT JOIN COUNTRY_REFERENCE CTRY ON CTRY.DESCRIPTION = DIM_SEC.ISSUER_COUNTRY
    LEFT JOIN BUSINESS_CLOSE_PERIOD BCP
    ON BCP.BUSINESS_CLOSE_DATE = ADD_MONTHS(TRUNC(TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD'),'MM'), 1) -1
    AND BCP.IS_LOCKED='Y' AND BCP.IS_ACTIVE='Y'
    LEFT JOIN GUI_STAGING STAGE ON
    FACT.POSITION_PKID=STAGE.POSITION_PKID
    AND STAGE.IS_ACTIVE='Y'
    AND STAGE.STATUS_ID IN(12,8,1,2,3,4,5)
    WHERE FACT.POSITION_PKID=64524374;
    While trying to sort this error, I found interesting things that made me more confused.
    if I remove TO_DATE function from select clause, same join query works.
    If I remove any table from join and keep TO_DATE function in select clause, query works.
    That tells, there is no problem in query.
    Then please anyone help me to sort out the error. FYI. I have googled a lot for this error. but didn't get solution/clue. That is why I am posting this problem to forum.
    Thanks in advance. waiting for reply ASAP.
    Pravin Pujari
    [email protected]

    I think i got the solution. The syntax i was using (ANSI syntax) doesn't work in the oracle database version i am using.
    When i updated my query with older oracle syntax, it worked.
    SELECT
    TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD')
    ,FACT.ROWID AS ABC1
    ,FACT_ADJ.ROWID AS ABC2
    ,SOURCE.ROWID AS ABC3
    ,DIM_SEC.ROWID AS ABC4
    ,DIM_SEC_ADJ.ROWID AS ABC5
    ,DIS_CAT.ROWID AS ABC6
    ,CTRY.ROWID AS ABC7
    ,BCP.ROWID AS ABC8
    ,STAGE.ROWID AS ABC8
    FROM [email protected] FACT
    ,[email protected] FACT_ADJ
    ,[email protected] SOURCE
    ,[email protected] DIM_SEC
    , [email protected] DIM_SEC_ADJ
    , [email protected] DIS_CAT
    , GUI.COUNTRY_REFERENCE CTRY
    , GUI.BUSINESS_CLOSE_PERIOD BCP
    , GUI.GUI_STAGING STAGE
    WHERE FACT.POSITION_PKID=64517140
    AND FACT_ADJ.POSITION_FKID(+) = FACT.POSITION_PKID
    AND SOURCE.SOURCE_SYSTEM_PKID=FACT.SOURCE_SYSTEM_FKID
    AND DIM_SEC.SECURITY_PKID=FACT.SUBSYS_SECURITY_FKID
    AND DIM_SEC_ADJ.SECURITY_PKID(+)=DIM_SEC.SECURITY_PKID
    AND FACT.DISCLOSURE_CATEGORY_FKID = DIS_CAT.DISCLOSURE_CATEGORY_PKID
    AND CTRY.DESCRIPTION = DIM_SEC.ISSUER_COUNTRY
    AND BCP.BUSINESS_CLOSE_DATE = ADD_MONTHS(TRUNC(TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD'),'MM'), 1) -1
    AND BCP.IS_ACTIVE='Y'
    AND FACT.POSITION_PKID=STAGE.POSITION_PKID
    AND STAGE.IS_ACTIVE='Y'
    AND STAGE.STATUS_ID IN(12,8,1,2,3,4,5);

  • V4.0 - Tabular form ORA-01445: cannot select ROWID from, or sample,

    Hi
    I'm creating a tabular form in version 4.0.
    The select is based on three tables all of which have primary keys, and the keys are selected, but every time I run the page I get the following error:-
    failed to parse SQL query:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    The query runs just fine in TOAD
    Any ideas?
    Thanks
    Mike
    select
    PRL.PERF_RATING_LINE_ID,
    PRL.PERF_RATING_LINE_ID PERF_RATING_LINE_ID_DISPLAY,
    PRL.BUSINESS_UNIT,
    PRL.EMPLID,
    ''''||PRL.REVIEW_YEAR REVIEW_YEAR,
    PRL.REVIEW_PERIOD,
    PRL.PERFORMANCE_SCORE,
    PRL.MODERATED_SCORE,
    PRL.HRM,
    PRL.COMMENTS,
    PBR.BU_DESC,
    ''''||PBR.DEPTID DEPTID,
    PBR.DEPT_DESC,
    PBR.EMPLOYEE_NAME,
    PBR.GRADE,
    PRL.SCORE_APPROVED_BY,
    PBR.TEMP_PERM,
    PBR.GENDER,
    PBR.JOB_START_DATE,
    decode(DECODE(SUBSTR(PBR.FLAG,1,5),'Job s',substr(PBR.FLAG,instr(PBR.FLAG,'~',1)+2,3)),
    'HIR','Hired','XFR','Transfer','REH','Rehire')||
    decode(SUBSTR(PBR.FLAG,1,30),'Job starts during period ~ XFR',' - '||substr(PBR.FLAG,instr(PBR.FLAG,'~',1,2)+2)) JOB_START_DETAILS,
    PBR.APPOINTMENT_DATE,
    SUBSTR(PBR.JOB_END_DETAILS,INSTR(PBR.JOB_END_DETAILS,'~',1,2)+2) JOB_END_DATE,
    SUBSTR(PBR.JOB_END_DETAILS,INSTR(PBR.JOB_END_DETAILS,'~',1,1)+2,INSTR(PBR.JOB_END_DETAILS,'~',1,2)-INSTR(PBR.JOB_END_DETAILS,'~',1,1)-2) REASON,
    PBR.JOB_GROUP,
    PBR.JOB_GROUP_DESC,
    PBR.JOBCODE,
    PBR.JOBCODE_DESC JOB_DESC,
    PBR.JOB_FAMILY,
    PBR.JOB_FAMILY_DESC,
    PBR.PBR_ID,
    MD.MGR_DEPT_ID
    from PERFORMANCE_BASE_REFRESH_V PBR,
    PERFORMANCE_RATING_LINE PRL,
    Y00_OPR_MGR_DEPT MD
    WHERE (PRL.BUSINESS_UNIT = PBR.BUSINESS_UNIT
    AND PRL.EMPLID = PBR.EMPLID
    AND PRL.REVIEW_YEAR = PBR.REVIEW_YEAR
    AND PRL.REVIEW_PERIOD = PBR.REVIEW_PERIOD)
    AND MD.OPRID = :APP_USER
    AND INSTR(':'||MD.DEPTS_MANAGED||':',':'||PBR.DEPTID||':') > 0
    AND MD.MGR_DEPT_ID > 0
    AND PBR.ADMIN_CENTRE IN
    (select c.deptid AC
    from [email protected] A,
    [email protected] C
    where A.ROWSECCLASS = C.ROWSECCLASS
    AND C.DEPTID != 'ZZZZ'
    and a.oprid = :APP_USER)
    AND (:P2210_BUSINESS_UNIT IS NULL
    OR PBR.BUSINESS_UNIT = :P2210_BUSINESS_UNIT)
    AND (:P2210_EMPLOYEE_NAME IS NULL
    OR INSTR(UPPER(PBR.EMPLOYEE_NAME),UPPER(:P2210_EMPLOYEE_NAME)) > 0)
    AND (:P2210_DEPARTMENT IS NULL
    OR PBR.DEPTID = :P2210_DEPARTMENT)
    AND (:P2210_PERFORMANCE_RATING IS NULL
    OR PBR.PERFORMANCE_SCORE = :P2210_PERFORMANCE_RATING)
    AND (:P2210_MODERATED_RATING IS NULL
    OR PBR.MODERATED_SCORE = :P2210_MODERATED_RATING)
    AND (:P2210_GRADE IS NULL
    OR PBR.GRADE = :P2210_GRADE)
    AND (:P2210_PERM_TEMP IS NULL
    OR PBR.TEMP_PERM = :P2210_PERM_TEMP)
    AND SUBSTR(NVL(PBR.JOB_END_DETAILS,'XXX'),1,3) NOT IN ('TER','TOC')
    AND PRL.SCORE_APPROVED_BY IS NULL

    Hi Marc,
    Thanks again for the quick reply and all the support the dev team is providing to us.
    Couple of question finally on this issue:
    - fixing the "copy page"/"copy validation" bug, our workaround - by making a page copy - we've found to use the standard validation on tabular form based on complex views will go away, right?
    - I made a sql trace when running the originally created tabular form page and I found the statement generated by the apex engine which gives the ORA-01446. Just wondering, would it be possible that apex is using the PK defined during the wizard instead of the rowid?
    - If not, would it be a possible enhancement request in the future to let the developer name the ROWID column optionally, and then apex will use that column as rowid instead of the ROWID? This can give flexibility for us as developers, in this case complex views (with instead of triggers) can be standard way supported. What I mean exactly is to create the above view in the testcase as follows (most of these cases there is always a base table in the view, and the rest of the tables are used as lookups, so I can pick up the desired ROWID in the view with an alias):
    CREATE OR REPLACE VIEW  CUSTOMER_ORDERS_V  AS
      SELECT cus.customer_id,
                cus.cust_last_name,
                cust_first_name,
                cus.cust_city,
                COUNT (ord.order_id) order_count,
                CUS.ROWID ROW_ID
           FROM demo_customers cus, demo_orders ord
          WHERE ord.customer_id(+) = cus.customer_id
       GROUP BY cus.customer_id,
                cus.cust_last_name,
                cust_first_name,
                cus.cust_city,
                CUS.ROWID;and then at design time, I could pick up the ROW_ID column as rowid, so all the rest of the functionality could work as working now on simple views and tables.
    What do you think on that?
    best regards,
    Peter

  • 'ORA-01445: cannot select ROWID' Tabular Form v4

    Hi Guys,
    We have been having major problems since upgrading from v2 to v4.
    One of the problem I have been having is with Tabular Forms.
    I have quite a complex page with multiple regions which has always worked fine in version 2. One of those regions is a tabular form. When the page loads, I am getting the:
    'ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table' error.
    The initial query was quite complex but I have broken it down:
    This query works and allows me to update the base table (xxmel_apex_eco_alterations)
    select
    alt.ALTERATION_ID,
    alt.ALTERATION_ID ALTERATION_ID_DISPLAY,
    alt.ECO,
    alt.ORGANIZATION_ID,
    alt.ACD_TYPE,
    alt.INVENTORY_ITEM_ID,
    alt.BEFORE_CHANGE_QTY,
    alt.AFTER_CHANGE_QTY,
    alt.MODIFY_FLAG,
    alt.REVISED_ASSEMBLY_ID,
    alt.BILL_SEQUENCE_ID,
    alt.COMPONENT_SEQUENCE_ID,
    alt.LAST_UPDATE_DATE,
    alt.LAST_UPDATE_BY,
    alt.COMMENTS,
    alt.BOM_IMPLEMENTATION_DATE,
    alt.BOM_CHANGE_NOTICE,
    alt.ASSEMBLY_NAME,
    alt.COMPONENT_NAME,
    alt.SELECTION_CRITERIA,
    alt.ORACLE_CHANGE_NOTICE,
    alt.COMP_CURRENT_COST,
    alt.COMP_NEW_COST,
    alt.COMP_CURRENT_SC,
    alt.COMP_NEW_SC,
    alt.COMP_DESCRIPTION,
    alt.COMP_CURRENT_UOM,
    alt.COMP_NEW_UOM,
    alt.COMP_CURRENT_PUR_STATUS,
    alt.COMP_NEW_PUR_STATUS
    from XXMEL_APEX_ECO_ALTERATIONS alt
    where eco = :P2_ECO
    But as soon as I try to join it to another table (which I am not trying to update, just display as hown below), I am getting the error.
    select
    alt.ALTERATION_ID,
    alt.ALTERATION_ID ALTERATION_ID_DISPLAY,
    alt.ECO,
    alt.ORGANIZATION_ID,
    alt.ACD_TYPE,
    alt.INVENTORY_ITEM_ID,
    alt.BEFORE_CHANGE_QTY,
    alt.AFTER_CHANGE_QTY,
    alt.MODIFY_FLAG,
    alt.REVISED_ASSEMBLY_ID,
    alt.BILL_SEQUENCE_ID,
    alt.COMPONENT_SEQUENCE_ID,
    alt.LAST_UPDATE_DATE,
    alt.LAST_UPDATE_BY,
    alt.COMMENTS,
    alt.BOM_IMPLEMENTATION_DATE,
    alt.BOM_CHANGE_NOTICE,
    alt.ASSEMBLY_NAME,
    alt.COMPONENT_NAME,
    alt.SELECTION_CRITERIA,
    alt.ORACLE_CHANGE_NOTICE,
    alt.COMP_CURRENT_COST,
    alt.COMP_NEW_COST,
    alt.COMP_CURRENT_SC,
    alt.COMP_NEW_SC,
    alt.COMP_DESCRIPTION,
    alt.COMP_CURRENT_UOM,
    alt.COMP_NEW_UOM,
    alt.COMP_CURRENT_PUR_STATUS,
    alt.COMP_NEW_PUR_STATUS
    , msib.segment1
    from XXMEL_APEX_ECO_ALTERATIONS alt
    , mtl_system_items_b msib
    where eco = :P2_ECO
    and msib.organization_id = 26
    and msib.inventory_item_id = alt.INVENTORY_ITEM_ID
    I have read Re: v4.0 - Tabular form ORA-01445: cannot select ROWID from, or sample, where someone was having a similar issue to me but their solution (in copying the script to build a new page) is not really an option for us due to the complexity to of the page as a whole.
    Is this a bug in APEX 4?
    Any help would be great,
    Thanks
    Chris

    Thanks Jaydip,
    That works great. Rather than joing hte Tabular From to multiple tables, I just created a function that returned the fields I required and included that in the select.
    select
    alt.ALTERATION_ID
    ,alt.ALTERATION_ID ALTERATION_ID_DISPLAY
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('PART NAME',alt.inventory_item_id,26) "Part Number"
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('PART DESC',alt.inventory_item_id,26) "Part Description"
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('ITEM TYPE',alt.inventory_item_id,26) "Part Number Type"
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('ITEM STATUS',alt.inventory_item_id,26) "Part Number Status"
    ,alt.BEFORE_CHANGE_QTY
    ,alt.AFTER_CHANGE_QTY
    ,alt.MODIFY_FLAG
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('PART NAME',alt.REVISED_ASSEMBLY_ID,26) "Revised BOM"
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('PART DESC',alt.REVISED_ASSEMBLY_ID,26) "Revised BOM Description"
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('ITEM TYPE',alt.REVISED_ASSEMBLY_ID,26) "Revised BOM Type"
    ,XXMEL_APEX_ECO_PKG.display_msib_records ('ITEM STATUS',alt.REVISED_ASSEMBLY_ID,26) "Revised BOM Status"
    ,alt.LAST_UPDATE_DATE
    ,alt.LAST_UPDATE_BY
    ,alt.COMMENTS
    ,alt.BOM_CHANGE_NOTICE
    ,alt.SELECTION_CRITERIA
    ,alt.ORACLE_CHANGE_NOTICE
    from XXMEL_APEX_ECO_ALTERATIONS alt
    where eco = :P2_ECO
    Thanks very much
    Chris

  • " ORA-01445: cannot select ROWID from, or sample, a join view without a key

    GREETINGS !
    CREATED TABULAR FORM WITH QUERY
    WHILE EXECUTE ON SQL COMMANDS ITS EXECUTES AND SHOWS RECORDS, PASTE SAME QUERY ON TABULAR FORM SOURCE . WHEN RUN PAGE IT GIVES ERROR
    " ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table".
    Edited by: Omzz on Oct 3, 2012 10:34 PM

    When setting the tabular form, only use the table that you are trying to update/modify.
    After that is working, modify the SQL source with the other tables.
    By just pasting an SQL query into the region source, it doesnt know what tables you are trying to update
    PS - Please turn off "Caps Lock" :-)

  • Ora-01445 cannot select rowid from or sample a join view ?

    Hi All
    I get this error , while creating VO
    "ora-01445 cannot select rowid from or sample a join view without a key-preserved table"
    I created an EO, my table doesnt have primary key and it EO by deafualt created ROWID as primary key
    When i create VO, using the following query by joining fnd_flex_values , then i see this ORA error
    SELECT xxg2sourceacctneweo.elimination_sob_id, xxg2sourceacctneweo.ROWID
    FROM xxg2_elim_source_accts xxg2sourceacctneweo, fnd_flex_values fvs WHERE fvs.flex_value = xxg2sourceacctneweo.source_acct_value
    but I was able to get the results in TOAD, with out any issue.
    as a part of testing , if i change the query to join to fnd_user , it works fine
    SELECT XXG2SourceAcctNewEO.ELIMINATION_SOB_ID,
    XXG2SourceAcctNewEO.ROWID FROM xxg2_elim_source_accts XXG2SourceAcctNewEO,fnd_user fc where fc.user_id=XXG2SourceAcctNewEO.created_by
    Any suggestions?
    Thanks
    Ravi
    Edited by: rashmrs on Oct 6, 2009 9:47 PM

    Ravi,
    Please mark some attributes as PRimary Key in your VO. Then the system would not automatically generate the ROWID. You can remove this View attribute using the VO wizard.
    Regards
    Sumit

  • ORA-01445 : cannot select rowid from a join view without a key preserved ta

    Hi,
    I am using Designer6i for generatin forms:
    my blokc is based on a view...
    when executing the module, I have the following error when trying to change a value of an item :
    FRM 40501: unabe to reserve record for update or delete ,
    the display error say :
    ORA-01445 : cannot select rowid from a join view without a key preserved table!!!!!
    Any help please ???

    you either create an INSTEAD OF trigger for that view or use on-lock trigger on that block to edit, e.g., SELECT ...INTO...FROM...WHERE...FOR UPDATE NOWAIT.

  • ORA-01445: cannot select ROWID from a join view without a key-preserved tab

    Hi All,
    I have 2 windows in a form. When i click on a button in first window, then 2nd window will be opened. (Note: both windows are based have master-details relationship with Table1 and Table2 respectively)
    When i enter the information in 2nd window and click the SAVE Button it has to save those values to database. It used to work fine earlier. now, i am getting the following error.
    FRM-40501: ORACLE error: unable to reserve record for update or delete.
    ORA-01445: cannot select ROWID from a join view without a key-preserved table
    Please help me, how can i resolve this error. Also, guide me what is a key-preserved table.
    Thanks in advance,
    Amar

    Firstly: - Please make sure that you have not opened the same record somewhere else in any other form and trying to update from there.
    Secondly: - In your window 1 have you opened the same record which you are querying, editing and saving in window 2 ? If yes then this will givbe you error as you are trying to update a record which is already being updated somewhere else.
    Please mark if it helps

  • ORA-01445: cannot select ROWID - View OK on one database, not on another

    Hi guys
    I was wondering if someone might be able to shed some light on this.
    I have taken an export of our apps development database, and imported it onto my own machine.
    There are a number of views that will not compile on my database, but are compiled fine on the development box.
    So I know the SQL is fine.
    My version of the database is 11.2.0.1.0, and the one I exported it from is 11.1.0.7.0 so there is a slight difference there, so I guess that could be the issue.
    So the message I get is :
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    And an example piece of sql causing this follows. Can anyone suggest why these views would be fine on one machine, but not on an exported version of the same database on my machine ?
    CREATE OR REPLACE VIEW OE_TRANSACTION_TYPES_V
    (row_id, transaction_type_id, transaction_type_code, order_category_code, start_date_active, end_date_active, creation_date, created_by, last_update_date, last_updated_by, last_update_login, program_application_id, program_id, request_id, currency_code, conversion_type_code, cust_trx_type_id, cost_of_goods_sold_account, entry_credit_check_rule_id, shipping_credit_check_rule_id, price_list_id, enforce_line_prices_flag, min_margin_percent, warehouse_id, demand_class_code, shipment_priority_code, shipping_method_code, freight_terms_code, fob_point_code, ship_source_type_code, agreement_type_code, agreement_required_flag, po_required_flag, invoicing_rule_id, invoicing_credit_method_code, accounting_rule_id, accounting_credit_method_code, invoice_source_id, non_delivery_invoice_source_id, default_inbound_line_type_id, default_outbound_line_type_id, inspection_required_flag, depot_repair_code, auto_scheduling_flag, scheduling_level_code, default_fulfillment_set, default_line_set_code, context, attribute1, attribute2, attribute3, attribute4, attribute5, attribute6, attribute7, attribute8, attribute9, attribute10, attribute11, attribute12, attribute13, attribute14, attribute15, name, description, org_id, organization_name, tax_calculation_event_code, picking_credit_check_rule_id, packing_credit_check_rule_id, sales_document_type_code, sales_document_type, def_transaction_phase_code, quote_num_as_ord_num_flag, layout_template_id, contract_template_id)
    AS
    SELECT vl.ROWID ROW_ID, vl.TRANSACTION_TYPE_ID, vl.TRANSACTION_TYPE_CODE, vl.ORDER_CATEGORY_CODE, vl.START_DATE_ACTIVE, vl.END_DATE_ACTIVE, vl.CREATION_DATE, vl.CREATED_BY, vl.LAST_UPDATE_DATE, vl.LAST_UPDATED_BY, vl.LAST_UPDATE_LOGIN, vl.PROGRAM_APPLICATION_ID, vl.PROGRAM_ID, vl.REQUEST_ID, vl.CURRENCY_CODE, vl.CONVERSION_TYPE_CODE, vl.CUST_TRX_TYPE_ID, vl.COST_OF_GOODS_SOLD_ACCOUNT, vl.ENTRY_CREDIT_CHECK_RULE_ID, vl.SHIPPING_CREDIT_CHECK_RULE_ID, vl.PRICE_LIST_ID, vl.ENFORCE_LINE_PRICES_FLAG, vl.MIN_MARGIN_PERCENT, vl.WAREHOUSE_ID, vl.DEMAND_CLASS_CODE, vl.SHIPMENT_PRIORITY_CODE, vl.SHIPPING_METHOD_CODE, vl.FREIGHT_TERMS_CODE, vl.FOB_POINT_CODE, vl.SHIP_SOURCE_TYPE_CODE, vl.AGREEMENT_TYPE_CODE, vl.AGREEMENT_REQUIRED_FLAG, vl.PO_REQUIRED_FLAG, vl.INVOICING_RULE_ID, vl.INVOICING_CREDIT_METHOD_CODE, vl.ACCOUNTING_RULE_ID, vl.ACCOUNTING_CREDIT_METHOD_CODE, vl.INVOICE_SOURCE_ID, vl.NON_DELIVERY_INVOICE_SOURCE_ID, vl.DEFAULT_INBOUND_LINE_TYPE_ID, vl.DEFAULT_OUTBOUND_LINE_TYPE_ID, vl.INSPECTION_REQUIRED_FLAG, vl.DEPOT_REPAIR_CODE, vl.AUTO_SCHEDULING_FLAG, vl.SCHEDULING_LEVEL_CODE, vl.DEFAULT_FULFILLMENT_SET, vl.DEFAULT_LINE_SET_CODE, vl.CONTEXT, vl.ATTRIBUTE1, vl.ATTRIBUTE2, vl.ATTRIBUTE3, vl.ATTRIBUTE4, vl.ATTRIBUTE5, vl.ATTRIBUTE6, vl.ATTRIBUTE7, vl.ATTRIBUTE8, vl.ATTRIBUTE9, vl.ATTRIBUTE10, vl.ATTRIBUTE11, vl.ATTRIBUTE12, vl.ATTRIBUTE13, vl.ATTRIBUTE14, vl.ATTRIBUTE15, vl.NAME, vl.DESCRIPTION, vl.ORG_ID, hou.NAME, vl.TAX_CALCULATION_EVENT_CODE, vl.PICKING_CREDIT_CHECK_RULE_ID, vl.PACKING_CREDIT_CHECK_RULE_ID, vl.SALES_DOCUMENT_TYPE_CODE, oel.meaning SALES_DOCUMENT_TYPE, vl.def_transaction_phase_code, vl.quote_num_as_ord_num_flag, vl.layout_template_id, vl.contract_template_id
    FROM OE_TRANSACTION_TYPES_VL vl, HR_ORGANIZATION_UNITS hou, oe_lookups oel
    WHERE vl.org_id = hou.organization_id(+) and oel.lookup_code (+) = vl.sales_document_type_code and oel.lookup_type (+) = 'SALES_DOCUMENT_TYPE'
    Thanks very much

    may want to check out
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:548422757486
    you probably need a unique constraint on one of your tables.
    create table t1 as select 1 x from dual;
    create table t2 as select 1 y from dual union /**/ all select 2 y from dual;
    create or replace view T
    as
    select rowid row_id from
    select t1.*, t2.* from t1, t2 where t1.x = t2.y
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved tableif we add the constraint.
    ALTER TABLE t2
    add CONSTRAINT constraint_name UNIQUE (y);then
    create or replace view T
    as
    select rowid row_id from
    select t1.*, t2.* from t1, t2 where t1.x = t2.y
    view created

  • ORA-20001: get_dbms_sql_cursor

    I am getting this error in an interactive report, the same query returns result in the sql workshop but not in the report. The query uses a dblink to access data in another database.
    The error I get is ORA-20001: get_dbms_sql_cursor error ORA-01747: invalid user.table.column, table.column, or column specification. I tried searching in this forum, but of no use.
    My Application Express 4.0.0.00.46 is running on oracle XE on windows XP machine. Can somebody help me understand this issue.

    Hi,
    SQLWorkshop uses the ANONYMOUS user to access the DB. When using application the Default Parsing schema credentials are used to access the DB/DBlinks.
    Most probably your Application Workspace Default Schema does not have access to the DB Link.
    Does the query run in a Classic report? Or from SQLPlus when you are connected as the Dfault Schema Owner of the Workspace where your application resides?
    Regards,

  • Scheduled Map Error: ORA-20001: Internal error ...

    I have a scheduled map that is failing daily - the full error message is below. The map is for a cube. The map validates, deploys and runs SUCCESSFULLY when started from the OWB control center.
    The schedule is simple: once a day @ 0600.
    The Map is configured: Row Based (Target Only), No Ansi, No Optimization, No Target Load Order, Table Analzye, 500 Bulk Load, 500 commit.
    The run time environment consists of: Windows Server 2003 SP1 x64, Oracle 10G x64 patched to the latest revision.
    Any ideas appreciated.
    Error from from Enterprize Manager 10g for the scheduled job:
    ORA-20001: ORA-20001: Begin. initialize complete. l_job_audit_execution_id= 3261. execute_task complete. l_audit_execution_id= 7194. l_stream_id= 11434. ORA-20001: Internal error ORA-20001: Execution completed with 0 error(s) and 1 warning(s). ORA-06512: at "D2D_REPO_OWNER.WB_RTI_WORKFLOW_UTIL", line 769 ORA-20001: Execution completed with 0 error(s) and 1 warning(s). ORA-06512: at "D2D_WH.PGRN_WARE_MEASUREMENT_MP_JOB", line 113 ORA-20001: Internal error ORA-20001: Execution completed with 0 error(s) and 1 warning(s). ORA-06512: at "D2D_REPO_OWNER.WB_RTI_WORKFLOW_UTIL", line 769 ORA-20001: Execution completed with 0 error(s) and 1 warning(s).

    OWB Control Center reports the error for the daily runs as below.
    I've seen this before - when the map is configured for set based fail over to row base. The deeper meaning appears to be duplicate data in the source.
    The Job details (Input Parameters) confirm that this job is running with a configuration that differs from what I've configured in the Repository - therefore I need to redeploy the map. I know I did this yesterday but somehow its wrong!
    ORA-30926: unable to get a stable set of rows in the source tables

Maybe you are looking for