ORA-01445 when literals in a view

OTN dear Forum,

I am creating this point of view, which generates a list of files with metadata in each line for example. "Description". I want to add a column with the same literal value in each row - 'Photo Unit Legacy Collection', but he doesn't seem to like it. I tested without the code on line 10 and I tested 10 independently in a separate query lines - both work.

I get the error message "unhandled exception warning,: ORA-01445: cannot select ROWID from where sample, a join without key preserved table view.

Can anyone help?


1 Select
2 csv. "" FILE "as"#FILE. "
3 csv.security_policies as "#SECURITY POLICIES."
4 csv.model as "#MODEL."
5 csv.nhm_field_department as "NHM_FIELD_DEPARTMENT."
6 photo_lib.jobtitle as "NHM_FIELD_ASSET_DESCRIPTION."
7 csv.nhm_field_asset_keywords as "NHM_FIELD_ASSET_KEYWORDS."
8 csv.nhm_field_file_creation_date as "NHM_FIELD_CREATION_DATE."
9 csv.nhm_field_original_file_path as "NHM_FIELD_ORIGINAL_FILE_PATH."
10 "Legacy Collection of photo unit" as "NHM_FIELD_GROUP_TITLE."
11 regexp_substr (csv. ("' NHM_FIELD_ASSET_DESCRIPTION",'[[: digit:]] {4,}') as 'TASK IDENTIFIER.
12 years of
13 csv join internal photo_lib
14 on (photo_lib.fk_jobid = regexp_substr (csv. "" FILE "," [[: digit:]] {4}')) "
15 where photo_lib.jobtitle is not null
16 and regexp_like (csv. "" FILE ","[...] *\. ((tif)')

You get the error create view, or when you try to choose in this one? What version of 4 numbers of Oracle are you running? There is at least a bug reported in MOS (see Doc ID 412362.1 if you have a support contract) for outer joins against versions 10.2.0.1 - 10.2.0.3.

You can try either simplify the view somewhat, perhaps to ot to rid the superfluous double quotes. Another possibility might be to try to make the regexp in a view online and join with this, something like:

select csv.file as "#FILE", csv.security_policies as "#SECURITY POLICIES",
       csv.model as "#MODEL", csv.nhm_field_department,
       photo_lib.jobtitle as NHM_FIELD_ASSET_DESCRIPTION,
       csv.nhm_field_asset_keywords, csv.nhm_field_file_creation_date,
       csv.nhm_field_original_file_path,
       'Photo Unit Legacy Collection' as NHM_FIELD_GROUP_TITLE,
       csv.job_identifier
from (select file, security_policies, model, csv.nhm_field_department,
             nhm_field_asset_keywords, nhm_field_file_creation_date,
             nhm_field_original_file_path,
             regexp_substr(NHM_FIELD_ASSET_DESCRIPTION,'[[:digit:]]{4,}') JOB_IDENTIFIER,
             regexp_substr(FILE,'[[:digit:]]{4}') jobid
      from csv
      where regexp_like(csv.FILE,'[...]*\.(tif)')) csv
   join photo_lib
      on photo_lib.fk_jobid = csv.jobid
where photo_lib.jobtitle is not null

John

Tags: Database

Similar Questions

  • ORA-01445: cannot select ROWID, or sample, a view of join without key - preserved table form w/report and LOV

    I create a page "Form on a Table with Report" (APEX 5). Table I has 3 columns: cat_key, item_value, item_description. The cat_key is a foreign key in a table with columns cat_key, cat_value. I created the report and everything works fine.  The page of the report shows my domain cat_key in number, so I want it instead to display the cat_value. I change the field cat_key to a text based on LOV, select my LOV and now when I view the page of report I get the "'ORA-01445: cannot select ROWID from where sample, a join without key preserved table view ' error." The report uses the ROWID as a link to the edit page field.

    If I use the same tables and even shared LOV in a report page interactive, it works fine.

    What I am doing wrong?

    This is a limitation of the IR Apex will rewrite your query to a query that includes the lookup table and the columns. So now you have actually created a query on an inline view, which causes the error. You can see the query apex created when running in debug mode. APEX will join the table of choice with your primary table. For example from one of my IR:

    Select 'ID '...

    "MSL". "" HIS_COUNTRIES "=> my primary table

    ) ) b,

    (select rv_meaning d, rv_low_value r

    of msl_ref_codes_table

    where rv_domain = "JOHN".

    ) L1 = > query My LOV Lookup

    ...

    So, if possible, base your reports and forms on the real primary key, no rowid.

    You can also write the IR query with the search yourself:

    Select T1.rowid...

    of primary_table T1

    look_table L1

    ...

  • ORA-01445 error: cannot select ROWID from where sample, a join without a view

    Hi all

    I get an error when I created a VO based EO with standard Table (forced) jtf_notes_vl
    It gives me the error ORA-01445: cannot select ROWID from where sample, a join without key preserved table view

    the Table has the ROW_ID as Primery key


    Thanks in advance

    Hello

    Creation of an EO-based the rowid as primary key is usually the cause of this error as is not recommended to use the rowid as the primary key. Try to use jtf_note_id as the primary key.

    Furthermore, why are you using NAV it is seen for the creation of EO. If I remember correctly, there is a JTF_NOTES_B and JTF_NOTES_TL table that you can use.

    Thank you
    AJ

  • Error ORA-01445 tabular form on a Collection in APEX 5

    When I load a page with a tabular presentation built on a display of a collection to the APEX 5, I'm getting an ORA-01445: cannot select ROWID, or the sample, a view of joining without an error table preserved key.

    I create a view

    CREATE or REPLACE FORCE VIEWS test_coll_vw

    (

    C001,

    C002,

    C003,

    C004,

    seq_id

    )

    AS

    SELECT TO_NUMBER (c001),

    C002,

    TO_NUMBER (c003),

    TO_NUMBER (c004),

    seq_id

    Of apex_collections

    WHERE collection_name = 'TEST '.

    Then create a tabular presentation on the view with the primary key of the source SEQ_ID and primary key of the trigger existing through the wizard.

    Debug information shows the statement which is a failure:

    Select NULL NULL "CHECK$ 01", "SEQ_ID,' NULL 'C001', NULL"C002', 'C003', 'C004', NULL NULL NULL "APEX$ ROWID ' sys.dual union all select ' CHECK$ 01", 'SEQ_ID', 'C001', 'C002', 'C003', "C004", "APEX$ ROWID" in (select NULL "CHECK$ 01", "SEQ_ID", "C001", "C002", "C003", "C004", "ROWID" "APEX$ ROWID" (select).

    "SEQ_ID."

    "C001."

    "C002."

    "C003."

    "C004.

    of 'WPCAMS_APP '. "" TEST_COLL_VW ".

    ) APEX$ RPTSRC

    order of 1, 7

    ).

    These tabular forms worked up to 4.2, but they seem to fail at 5 APEX for upgrade or newly created pages one.  The generated query is identical between versions, but it seems that the underlying apex_collections view has changed between versions and the origin of the problem.

    Does anyone have a solution or workaround?

    Thank you

    Hi Phil,

    APEX 5.0 the definition of the view of apex_collection had to be changed for security reasons. This change introduced a regression with tabular form validations, when the table refers to this view. Tabular form declarative validations require the ROWID in order to restore your changed data after a validation failed, and for this reason, APEX is insert the IDENTIFIER in the query in a table. It is currently not possible when tables refers to the sight of apex_collections. We are looking at a solution to this problem, but for now the only way to get around this is not, in this case, use the declarative validation and use some custom validations or process.

    Kind regards
    Marc

  • ERROR: ORA-01445

    Hello

    Can you please let me know how to select the ROWID of the table all_ind_expressions? I tried to run the following SQL query on the Oracle version 10.2.0.3 but received the error ORA-01445.


    Select the ROWID in all_ind_expressions
    where index_owner = "DBO."

    Thank you

    Published by: user12088323 on February 24, 2011 18:29

    Published by: user12088323 on February 24, 2011 18:30
    SQL> select text from dba_views where view_name = 'DBA_IND_EXPRESSIONS';
    
    TEXT
    --------------------------------------------------------------------------------
    select io.name, idx.name, bo.name, base.name, c.default$, ic.pos#
    from sys.col$ c, sys.obj$ idx, sys.obj$ base, sys.icol$ ic,
         sys.user$ io, sys.user$ bo, sys.ind$ i
    where bitand(ic.spare1,1) = 1         /* an expression */
      and (bitand(i.property,1024) = 0) /* not bmji */
      and ic.bo# = c.obj#
      and ic.intcol# = c.intcol#
      and ic.bo# = base.obj#
      and io.user# = idx.owner#
      and bo.user# = base.owner#
      and ic.obj# = idx.obj#
    
    TEXT
    --------------------------------------------------------------------------------
      and idx.obj# = i.obj#
      and i.type# in (1, 2, 3, 4, 6, 7, 9)
    

    Who should be returned to ROWID when SELECT view above?

    Published by: sb92075 on February 24, 2011 16:47

  • "ORA-01445: cannot select ROWID' v4 tabular.

    Hi guys,.

    We had major problems since the transition from v2 to v4.

    One of the problems I've had is with tabular forms.

    I have a complex page with many regions which has always worked well in version 2. One of these regions is a tabular presentation. When loading the page, I get the:

    "ORA-01445: cannot select ROWID from where sample, a join without key preserved table view ' error."

    The initial request was quite complex, but I've broken down it:

    This query runs and allows me to update the base table (xxmel_apex_eco_alterations)

    Select
    replace. ALTERATION_ID,
    replace. ALTERATION_ID ALTERATION_ID_DISPLAY,
    replace. ECO,
    alt.ORGANIZATION_ID,
    replace. ACD_TYPE,
    replace. INVENTORY_ITEM_ID,
    replace. BEFORE_CHANGE_QTY,
    replace. AFTER_CHANGE_QTY,
    replace. MODIFY_FLAG,
    replace. REVISED_ASSEMBLY_ID,
    replace. BILL_SEQUENCE_ID,
    alt.COMPONENT_SEQUENCE_ID,
    replace. LAST_UPDATE_DATE,
    replace. LAST_UPDATE_BY,
    alt.COMMENTS,
    replace. BOM_IMPLEMENTATION_DATE,
    replace. BOM_CHANGE_NOTICE,
    replace. ASSEMBLY_NAME,
    alt.COMPONENT_NAME,
    replace. SELECTION_CRITERIA,
    replace. 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
    ALT XXMEL_APEX_ECO_ALTERATIONS
    where eco =: P2_ECO


    But as soon as I try to join another table (I do not update, just view as shown below), I get the error.

    Select
    replace. ALTERATION_ID,
    replace. ALTERATION_ID ALTERATION_ID_DISPLAY,
    replace. ECO,
    alt.ORGANIZATION_ID,
    replace. ACD_TYPE,
    replace. INVENTORY_ITEM_ID,
    replace. BEFORE_CHANGE_QTY,
    replace. AFTER_CHANGE_QTY,
    replace. MODIFY_FLAG,
    replace. REVISED_ASSEMBLY_ID,
    replace. BILL_SEQUENCE_ID,
    alt.COMPONENT_SEQUENCE_ID,
    replace. LAST_UPDATE_DATE,
    replace. LAST_UPDATE_BY,
    alt.COMMENTS,
    replace. BOM_IMPLEMENTATION_DATE,
    replace. BOM_CHANGE_NOTICE,
    replace. ASSEMBLY_NAME,
    alt.COMPONENT_NAME,
    replace. SELECTION_CRITERIA,
    replace. 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
    ALT XXMEL_APEX_ECO_ALTERATIONS
    mtl_system_items_b msib
    where eco =: P2_ECO
    and msib.organization_id = 26
    and msib.inventory_item_id = ALT INVENTORY_ITEM_ID

    I read Re: v4.0 - in the form of ORA-01445: cannot select ROWID from where sample, where someone had a similar problem for me, but their solution (by copying the script to create a new page) isn't really an option for us the complexity to the page as a whole.

    Is this a bug in 4 APEX?

    Any help would be great,

    Thank you
    Chris

    Hello

    This isn't a bug in the apex, if you want to display a different table column there is a way to create a function to get the value of this table

    to "msib.segment1", you must create a function that accepts that some primary key to and retrieves the value of 'mtl_system_items_b' and can return a value in the field "segment1".

    and you can use your previous query, you can add the name of function as a new field

    for example

    Select
    replace. ALTERATION_ID,
    replace. ALTERATION_ID ALTERATION_ID_DISPLAY,
    replace. ECO,
    alt.ORGANIZATION_ID,
    replace. ACD_TYPE,
    replace. INVENTORY_ITEM_ID,
    replace. BEFORE_CHANGE_QTY,
    replace. AFTER_CHANGE_QTY,
    replace. MODIFY_FLAG,
    replace. REVISED_ASSEMBLY_ID,
    replace. BILL_SEQUENCE_ID,
    alt.COMPONENT_SEQUENCE_ID,
    replace. LAST_UPDATE_DATE,
    replace. LAST_UPDATE_BY,
    alt.COMMENTS,
    replace. BOM_IMPLEMENTATION_DATE,
    replace. BOM_CHANGE_NOTICE,
    replace. ASSEMBLY_NAME,
    alt.COMPONENT_NAME,
    replace. SELECTION_CRITERIA,
    replace. 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,
    newfunction (pkId) as segment1
    ALT XXMEL_APEX_ECO_ALTERATIONS
    where eco =: P2_ECO

    Thank you
    Abdou Bosamiya

  • ORA-01031: insufficient privileges while selectin view belongs to another schema in oracle database 11g

    Hello

    DB version 11.2.0.3.0

    We have a few views resides in the application schema, we cerated user and granted select on the view through the roles.

    but the user becomes ORA-01031: insufficient privileges when accessing the content view

    appreciated inputs

    BR

    Praaksh GR

    > I issued a grant select on Z.table - X with the option grant.

    This isn't what you need - you should

    Grant select on Z.table y with the option grant.

    Grant select on Y.view to X;

  • v4.0 - in the form of ORA-01445: cannot select ROWID from where sample,.

    Hello
    I have created a form in table form in version 4.0.
    Selection is based on three tables that have primary keys, the keys are selected, and whenever I run the page I get the following error:-
    Failed to parse the SQL query:
    ORA-01445: cannot select ROWID, or sample, join without table views preserved key

    The query runs very well in the TOAD

    Any ideas?

    Thank you

    Mike
    ___________________________________________________________________________________
    Select
    CTR. PERF_RATING_LINE_ID,
    CTR. PERF_RATING_LINE_ID PERF_RATING_LINE_ID_DISPLAY,
    CTR. BUSINESS_UNIT,
    CTR. EMPLID,
    ''''|| CTR. REVIEW_YEAR REVIEW_YEAR,
    CTR. REVIEW_PERIOD,
    CTR. PERFORMANCE_SCORE,
    CTR. MODERATED_SCORE,
    CTR. HUMAN RESOURCES MANAGEMENT,
    PRL.COMMENTS,
    ACB. BU_DESC,
    ''''|| ACB. DEPTID DEPTID,
    ACB. DEPT_DESC,
    ACB. EMPLOYEE_NAME,
    ACB. GRADE,
    CTR. SCORE_APPROVED_BY,
    ACB. TEMP_PERM,
    ACB. GENDER,
    ACB. JOB_START_DATE,
    decode (DECODE (SUBSTR (ACB. FLAG, 1, 5), "S Job", substr (CPR. FLAG, instr (CPR. FLAG,'~ ', 1) + 2, 3));
    "HIR", "Committed", "XFR", "Transfer", "REH", "recall").
    Decode (SUBSTR (ACB. FLAG, 1, 30), "work starts the period ~ XFR ',' - ' | substr (CPR. FLAG, instr (CPR. FLAG,'~ ', 1, 2) + 2)) JOB_START_DETAILS,.
    ACB. APPOINTMENT_DATE,
    SUBSTR (CPR. JOB_END_DETAILS, INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 2) + 2) JOB_END_DATE.
    SUBSTR (CPR. JOB_END_DETAILS, INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 1) + 2, INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 2) - INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 1)-2) REASON,
    ACB. JOB_GROUP,
    ACB. JOB_GROUP_DESC,
    ACB. JOBCODE,
    ACB. JOBCODE_DESC JOB_DESC,
    ACB. JOB_FAMILY,
    ACB. JOB_FAMILY_DESC,
    ACB. PBR_ID,
    MD. MGR_DEPT_ID
    PERFORMANCE_BASE_REFRESH_V ACB,.
    PERFORMANCE_RATING_LINE PRL,
    Y00_OPR_MGR_DEPT MD
    WHERE (PRL. BUSINESS_UNIT = ACB. BUSINESS_UNIT
    AND PRL. EMPLID = ACB. EMPLID
    AND PRL. REVIEW_YEAR = ACB. REVIEW_YEAR
    AND PRL. REVIEW_PERIOD = ACB. REVIEW_PERIOD)
    AND MD. OPRID =: APP_USER
    AND INSTR (': ' |) MD. DEPTS_MANAGED |': ',' :'|| ACB. DEPTID |': ') > 0
    AND MD. MGR_DEPT_ID > 0
    AND CPR. ADMIN_CENTRE IN
    (select c.deptid AC
    of PSHR. PSOPRDEFN@PSHR. CSIR.CO. ZA,.
    PSHR.PS_SCRTY_TBL_DEPT@PSHR. CSIR.CO. ZA 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 (CPR. 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. CATEGORY =: P2210_GRADE)
    AND (: P2210_PERM_TEMP IS NULL)
    OR PBR. TEMP_PERM =: P2210_PERM_TEMP)
    AND SUBSTR (NVL (ACB. (JOB_END_DETAILS, "XXX"), 1, 3) NOT ("TER", "TOC")
    AND PRL. SCORE_APPROVED_BY IS NULL

    Mike,

    We also changed our Wizard to create only validations for columns that are selected to be updated (in the wizard on the page in a table). And in the case of the application wizard, we examine if the columns have been excluded on the edit page popup page, and they are set to read-only through the default user interface. If you should only get validations for the columns that are modifiable, view-only / save state or hidden. We include only display / save state and hidden, because in both cases, you have actual shape on your page elements, which could easily be manipulated through common web tools.

    Kind regards
    Marc

  • I get garbage when you click on "View Page Source" of maff backup files.

    Hello
    Saved files mhtml and html, the HTML etc code view when selecting "View Page Source".
    Since the installation of the add-on Firefox to save web pages in the form of maff files, when you click on "View Page Source" it displays garbage.
    Is it possible to view the original source of a maff file saved?

    A MAFF file is a ZIP archive, so you should have extract the files in an Archive Manager, if you do not use an extension to handle this type of file.

  • Music application crashes when you try to view playlists

    I've recently downgraded from ios to ios 9.3.2,and 10 However, I had a few problems, one of the problems is that when I try to view on the application of music playlists, it crashes, it's quite annoying because I don't want to reset my phone and I use the music app a lot!

    It seems also I can't use hue phillips and when I try to play music, it crashes

  • I get "an error occurred, please try again later" when you try to view videos youtube on Firefox, but no problems on Chrome

    I get the error: "year error has occurred, please try again later" when you try to view videos youtube on Firefox.
    I tried to use Google Chrome and everything's good about it.

    Things I've tried:

    • Clearing cookies, history etc.
    • Removal of cookies.sqlite
    • Re-installed a new Firefox
    • Re-installed Flash Player 14
    • Get rid of Flash Player 14 and returned to Flash Player 11

    None of this has worked.

    I get the error for all videos to youtube every time, it is not a random phenomenon.

    I'm really frustrated by it because Firefox is my favorite browser and now I am forced to switch to Chrome.

    If you live in India then see:

  • Last night suddenly when I right click view image in firefox, they appear centered and on a black background. He is generally meant to be a white background and the image that appears at the top left. How to get back to it?

    I have a problem with something in firefox, it is quite minor, but still bothers me. Last night suddenly when I right click view image in firefox, they appear centered and on a black background. He is generally meant to be a white background and the image that appears at the top left. I don't remember what I did to change this if it's my fault; If anyone knows how to get back to it, I would be grateful.

    This is the new behavior in Firefox 11.

    See also:

  • For 2-3 months, Firfefox no longer records history. When I click on view history, it is empty. This only happens on my desktop, my laptop. Both are under OX10.7.2 and Firefox 8.0.1 Mac

    For 2-3 months, Firefox no longer records history. When I click on view history, it is empty. This only happens on my desktop, my laptop. Both are Mac under OS 10.7.2 and Firefox 8.0.1. I remember not to make changes to any settings or preferences. It just seems to happen one day and I were ignorant but would like to fix.

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

  • Gmail loads fine, but when I try to view the e-mail, shows nothing below the sender's address.

    Gmail loads fine, but when I try to view the e-mail, shows nothing below the sender's address.

    Content of the entire message missing GMail (empty) after the title of the header

    In Firefox, if you have an extension "Adblock Plus".

    1. 'Ctrl + Shift + F' preferences (or right click on the symbol of the ADP and choose Preferences)
    2. 'Filters' menu > 'update all subscriptions'.

    Reference: https://support.mozilla.com/questions/896267

  • Monitor is white empty when you try to view the video full screen on youtube.

    I have a HP w2207h screen flat monitor. When I try to view online, such as YouTube videos, full screen, the screen goes to a blank white screen. Sound works, no picture. However, when I view the same video from YouTube in Internet explore everything works fine. Is there a setting that I need to solve this problem? Would appreciate your help!

    Try disabling hardware acceleration in Flash Player.

    See the videos in Flash will not play in full screen

    Blink the window "display settings":

Maybe you are looking for