Table and Primary Key Case Sensitive in Automated Row Fetch

Why are the table and primary key fields case sensitive in the Automated Row Fetch process? I'm debugging an error in this process and I'm not sure what the case should be.

Russ - It's a defect of sorts. Use upper case in the process definition. I don't think these processes will work with tables or columns whose names are not known to the database as upper-case values, i.e., defined using double-quoted non-upper case.
Scott

Similar Messages

  • Dynamic SQL Joining between tables and Primary keys being configured within master tables

    Team , Thanks for your help in advance !
    I'm looking out to code a dynamic SQL which should refer Master tables for table names and Primary keys and then Join for insertion into target tables .
    EG:
    INSERT INTO HUB.dbo.lp_order
    SELECT *
    FROM del.dbo.lp_order t1
    where not exists ( select *
    from hub.dbo.lp_order tw
    where t1.order_id = t2.order_id )
    SET @rows = @@ROWCOUNT
    PRINT 'Table: lp_order; Inserted Records: '+ Cast(@rows AS VARCHAR)
    -- Please note Databse names are going to remain the same but table names and join conditions on keys
    -- should vary for each table(s) being configured in master tables
    Sample of Master configuration tables with table info and PK Info :
    Table Info         
    Table_info_ID    Table_Name    
    1        lp_order    
    7        lp__transition_record    
    Table_PK_Info        
    Table_PK_Info_ID    Table_info_ID    PK_Column_Name
    2                1    order_id
    8                7    transition_record_id
    There can be more than one join condition for each table
    Thanks you !
    Rajkumar Yelugu

    Hi Rajkumar,
    It is glad to hear that you figured the question out by yourself.
    There's a flaw with your while loop in your sample code, just in case you hadn't noticed that, please see below.
    --In this case, it goes to infinite loop
    DECLARE @T TABLE(ID INT)
    INSERT INTO @T VALUES(1),(3),(2)
    DECLARE @ID INT
    SELECT @ID = MIN(ID) FROM @T
    WHILE @ID IS NOT NULL
    PRINT @ID
    SELECT @ID =ID FROM @T WHERE ID > @ID
    So a cursor would be the appropriate option in your case, please reference below.
    DECLARE @Table_Info TABLE
    Table_info_ID INT,
    Table_Name VARCHAR(99)
    INSERT INTO @Table_Info VALUES(1,'lp_order'),(7,'lp__transition_record');
    DECLARE @Table_PK_Info TABLE
    Table_PK_Info_ID INT,
    Table_info_ID INT,
    PK_Column_Name VARCHAR(99)
    INSERT INTO @Table_PK_Info VALUES(2,1,'order_id'),(8,7,'transition_record_id'),(3,1,'order_id2')
    DECLARE @SQL NVarchar(MAX),
    @ID INT,
    @Table_Name VARCHAR(20),
    @whereCondition VARCHAR(99)
    DECLARE cur_Tabel_Info CURSOR
    FOR SELECT Table_info_ID,Table_Name FROM @Table_Info
    OPEN cur_Tabel_Info
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    WHILE @@FETCH_STATUS = 0
    BEGIN
    SELECT @whereCondition =ISNULL(@whereCondition+' AND ','') +'t1.'+PK_Column_Name+'='+'t2.'+PK_Column_Name FROM @Table_PK_Info WHERE Table_info_ID=@ID
    SET @SQL = 'INSERT INTO hub.dbo.'+@Table_Name+'
    SELECT * FROM del.dbo.'+@Table_Name+' AS T1
    WHERE NOT EXISTS (
    SELECT *
    FROM hub.dbo.'+@Table_Name+' AS T2
    WHERE '+@whereCondition+')'
    SELECT @SQL
    --EXEC(@SQL)
    SET @whereCondition = NULL
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    END
    Supposing you had noticed and fixed the flaw, your answer sharing is always welcome.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Automated Row Fetch

    I am struggling to get two forms on the same page work as they are suppose to. One of the problems is with Automated Row Fetch. To condense the problem I tried the following (on a test page):
    Created a form/table on table A with primary key PK_A
    Among other things this creates the automated row fetch for this form and a field P1_PK_A. containing the PK.
    Created another form/table on table B with primary key PK_B which creates automated row fetch for B and P1_PK_B
    Since I am concentrating on fetch process deleted all buttons and processes except FETCH row for both forms.
    Now:
    When I pass a value to P1_PK_A in the URL and no value for P1_PK_B it fetches the row in form A fine, same is true the other way around. However if I pass valid keys for both forms in the URL it fails to fetch row for the second form.
    Am I missing something or if not how am I to have two forms on a page?

    Thanks for the quick response Joe,
    I deleted the process created by the wizard and created another data manipulation process with the wizard - which created another autmated row fetch and makes no difference. By creating the fetch and DML manually do you mean that I have to create PL/SQL process to fetch the values for the second form?
    Btw how in the world I missed the part that you can't have two automated DML processes on a page I don't know.

  • Automated Row Fetch for complex primary keys

    I would like to post a workaround for using automated row fetch on tables with a complex primary key (more than 2 components).
    APEX has the restriction of just beeing able to handle <= 2 PK components, which is not acceptable to me in quite a lot of scenarios.
    Imagine a situation where you want to manage recipes for dishes. Each recipe has several versions and each version has several recipe-positions. The PK consists of recipe_id, recipe_version and recipe_position.
    You hava a report displaying the positions of a specific recipe version and this report contains an edit link that jumps to a form, where the attributes of a recipe position can be edited.
    Creating the edit position form, you can only specify a primary and a secondary key item/column. Given that, if you want to use the edit form by clicking the edit link, you will receive the error "ORA-01422: exact fetch returns more than requested number of rows", because the third PK compound is not used as a restriction.
    The workaround is to present the ROWID pseudo-column to the form as the primary key.
    Create a (hidden) Item to store the ROWID-Value of the current row and simply change the properties of the ARF-Process to accept ROWID as the PK column and specify the corresponding item.
    If automated processing of recipe_position is desired, you can specify it as the secondary key column.
    I don't know if this woraround/solution is very ugly, but it works ...
    Ingo

    Hello Ingo,
    I tend to avoid ROWID. In the Interactive Report it's used too.
    The ROWID can change, where a Primary Key normally doesn't change, that's the biggest thing I worry about. How does Oracle know not somebody else already updated the row?
    I always wonder what happens when you're in a cluster/RAC and use ROWID. Isn't it possible that you get two rows for the same rowid?
    Just my thoughts.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • Automated row fetch / Complex primary key

    I have a complex primary key made up of ticket_num, ticket_seq because there may be between 1-3 rows associated with one ticket_num.
    The problem I am having is the automated row fetch errors out when trying to update a ticket with the following error even though the combination of ticket_num, and ticket_seq are unique, and ticket_num, ticket_seq are entered in the automated row fetch as primary key column, and secondary key column.
    ORA-01422: exact fetch returns more than requested number of rows
    Is there a way to put both columns as the primary key?

    Thanks, Scott. I had the exact same problem, and your suggestion fixed it.
    May I suggest that this is a bug in Apex? In the create application wizard, select "Add Page" -> "Report and Form", and select a table with a compound primary key consisting of two columns. Apex will create the report and the form, and will configure the ARF correctly in the form, but it does not specify a value for the second key in the Link Column section of the report attributes.
    Thanks,
    Mike

  • Null value in detail table's primary key

    I use Business Components Data Form to define a master-detail java panel.
    I don't display the primary key column in the detail grid control.
    Then I click on "+" to add a row, enter a value (the 2nd part of the detail table's primary key) and click commit.
    I get an error saying that the primary key column that's not displayed is null and the row cann't be committed.
    How do I fix this error?

    My fields are varchar2's.
    -- simplified to protect the guilty:
    -- (made up from memory, so sql keywords may --be misspelled, but you get the idea)
    create table proj (
    proj varchar2(10) not null,
    constraint proj_pk
    primary key(proj)
    insert into proj values ('abc');
    commit;
    -- this table has legal values for -- the master.legal field.
    -- in master, legal was changed to a -- ComboBoxControl control from -- TextFieldControl that the wizard -- generated.
    create table legal_values (
    proj varchar2(10) not null,
    legal varchar2(10) not null,
    display_order integer not null,
    constraint legal_values_pk
    primary key (proj, legal)
    insert into legal_values
    values ('abc', 'one', 1);
    insert into legal_values
    values ('abc', 'two', 2);
    insert into legal_values
    values ('abc', 'three', 3);
    commit;
    create table master (
    proj varchar2(10) not null,
    masterKey varchar2(15) not null,
    legal varchar2(10) not null,
    constraint master_pk
    primary key (proj, masterKey)
    create table detail (
    proj varchar(10) not null,
    masterKey varchar(15) not null,
    detailkey varchar(10) not null,
    display_order integer not null,
    status varchar2(12) not null, -- user can only update this field
    constraint detail_pk
    primary key(proj, masterkey, detailkey)
    -- legal rows for detail table
    create table detail_values (
    proj varchar2(10) not null,
    detailkey varchar2(10) not null,
    display_order integer not null,
    constraint detail_values_pk
    primary key(proj, detailkey)
    insert into detail_values values
    ('abc', 'status a', 1);
    insert into detail_values values
    ('abc', 'status b', 2);
    commit;
    -- if their is a foriegn key on details back
    -- to master, then you get the
    -- "mutating table" error when trigger
    -- occurs.
    create or replace trigger master_tr
    after insert on master
    for each row
    begin
    insert into detail
    (masterKey, detailKey, status, display_order, status)
    select :new.masterkey, detail_key, display_order, ' '
    from detail_values;
    end;
    -- detail.status is a comboboxControl getting --its values of of another db table too.
    -- there's also "after update" triggers on master and detail tables that copy the record to master_history and "detail_history" tables if the corresponding table is modified. Thus we have a history of the changes made to the records. The 2 history tables have 2 additional fields than their parents, "modified_date date default sysdate not null" and "modified_by varchar2(30) default user not null" that record when and who made the change. There's also a change type field that records where the change is an insert, delete or update (there 3 triggers per table , so we can correctly record change type as being insert, delete or update into the change_type field).
    If you want to make it more real to life, the status value is initially blank, then can be changed to a legal status value (complete or not complete), but can not be changed back to blank.
    ***P.S. I have to have this ready for production by monday.****
    P.P.S After you reply and change to ComboBoxControls in 2 places, try changing the table names and/or the column names (say to follow the DBA's naming convention) or add another field to the composite primary key (and unstated foriegn key) (using drop table/create table). Now try getting the existing code to run. No writing down the old/new table (or column) name pair names. Just run the code and try to fix the code based on the error messages. Are the error messages giving you adequate information to find the problem?

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • Difference between Unique key and Primary key(other than normal difference)

    Hello,
    1).Can any one tell me any other difference between Unique key and Primary key other than it having NULLs.
    2). What is the difference the words 'DISTINCT' and 'UNIQUE' in a sql query.
    Thanks in advance.

    Hi
    If you don't believe me than see the documentation in
    OTN.
    Ott Karesz
    http://www.trendo-kft.hu
    SQL> create table scott.tbl_clob
      2  (sss CLOB)
      3  /
    Tabelle wurde angelegt.
    SQL> insert into scott.tbl_clob values('wrwrwrw')
      2  /
    1 Zeile wurde erstellt.
    SQL> insert into scott.tbl_clob values('wrwrwrw')
      2  /
    1 Zeile wurde erstellt.
    SQL> select distinct sss from scott.tbl_clob
      2  /
    select distinct sss from scott.tbl_clob
    FEHLER in Zeile 1:
    ORA-00932: nicht übereinstimmende Datentypen
    SQL> select unique sss from scott.tbl_clob
      2  /
    select unique sss from scott.tbl_clob
    FEHLER in Zeile 1:
    ORA-00932: nicht übereinstimmende Datentypen
    SQL> select distinct to_char(sss) from scott.tbl_clob
      2  /
    TO_CHAR(SSS)
    wrwrwrw
    SQL> select unique to_char(sss) from scott.tbl_clob
      2  /
    TO_CHAR(SSS)
    wrwrwrw
    SQL>

  • Diff b/w surragate keys and primary keys

    Can any one of u pls explain the difference between primary key and surragate keys,pls explain me with simple example

    Hi rajesh,
    surrogate key: For every master data record, system create a SID (Surrogate ID). If that particular master data record is used in infocube, system store the SID corresponding to that master data in dimension table and the dimension id of the dimension table is stored in infocube Fact 'F' table.
    Primary key: while creating a table we will select unique field and create as primary key..for eg empid acts as a unique key (primary key) for emp table. through this primary key we can identify the table to get the data from the table.
    i hope this helps u.
    regards
    anil

  • Unique and primary key

    column with unique constraint + not null constraint = primary key! (to some extent) Is it correct?
    I invite your ideas

    http://www.techonthenet.com/oracle/unique.php
    http://www.allapplabs.com/interview_questions/db_interview_questions.htm#q13
    Difference between Unique key and Primary key(other than normal difference)

  • Every table need primary key in toplink mapping to fetch the data

    Hi everyone,
    we are working on toplink mapping , it neccessary every table needs primary key. if yes, gave me example.

    Hi everyone,
    Alterations in database will not be automatically reflected in toplink so, there is any alternative
    with regards
    abusufian

  • I recent la format the drive and create a case sensitive jornal and put a password. How I undo it if I just see the whole drive as the recovery disk

    I want to format my computer and I start to do that but I fondo a copy of the boot folder on the drive, not the recovery drive. I formated and make it case sensitive jornal with a password. Then I put a password in main too. So the drive the entre drive become my recovery drive.So I have two recovery drive I think.I learn almost all the diskutil comando and I don know how to fin it. The disks are not showing the one with the passwords.

    Hi Kappy,
    Just wondering if you had any advice for my situation . . .
    My time machine backup was backing up to a drive that was "Mac OS X Enteded Journaled, Case Sensitive."  I had no idea what this meant, or that it would even cause issues.
    I took my computer to the Apple store yesterday, and they wiped it clean.  When they tried to restore it from the Time Machine backup drive, it would not work.  Their guess is that Time Machine cannot restore from a drive that is "case sensitive."
    Any thoughts on how I can convert my time machine backup data from a "case sensitive" state, to a "non-case sensitive" state?  I've tried to just drag and drop the files from the case sensitive formatted drive to a new drive that I have that is formatted non case sensitive, but I get the following error message:
    "The volume has the wrong case sensitivity for a backup"
    I just really want my data back - I thought TimeMachine was the way to go (and was supposed to work) but unfortunately it is not.
    Any help you can provide would be greatly appreciated.
    Thanks,

  • How to trigger the automated row fetch process and open modal window by javascript api?

    Hi,
    I would like to click the one row of column of IR report, to open the modal window of current page.  <----------------it is ok. I can use "javascript:openModal('windowID')"  to do it.
    There is one form in this modal window, Meanwhile, I would like to pass column data to this form.    <--------------------- it is ok also. I can use " $s('P7_ID','column_value');" to do it.
    But I don't know how to trigger the "automated row fetch" process of this form to retrieve other field's value in this form.   
    I tried to use following 2 ways. But failed.
    First method:
    add one ajax process of "automated row fetch" in "page processing" block, named "get_fetch_data"
    when click IR column , call "openModal", and call  "apex.server.process ( "get_fetch_data", {}, { success: function( pData ) { }  } );"  , I tried to call above ajax process to refresh form. It is failed.
    Second method:
    add one process of  "automated row fetch" in "page rendering" block, named "get_fetch_data"
    when click IR column, call javascript api "apex.submit" to submit current page , then call "openModal".
    such as :  javascript:apex.submit({request:'MODIFY',set:{'P7_ID': #ID#}}); openModal('trade');
    But it is failed also. the modal page is showed firstly. then page refresh. but modal window will not open again.
    I am not sure if my thinking is right. Could you please provide any suggestion?
    Thanks in advance,
    Ping

    Hi Ping,
    You can try to set the session state of your modal page's primary key before opening the modal page. Use one dynamic action (on click of IR row) with two true actions. First one to set session state of modal page pk, second on to open modal page.
    Or you can add the modal page url as link in your report by extending your query:
    select ...
    ,         apex_util.prepare_url( 'f?p='||:APP_ID||':7:'||:APP_SESSION||'::'||:DEBUG||':7:P7_ID'||COLUMN_VALUE ) as link
    from ...
    This will give you the url of the modal page, with set primary key.
    Regards,
    Vincent Deelen
    http://vincentdeelen.blogspot.com

  • Automated row fetch returns more than one row

    Greetings All,
    Does anyone know of a way to call a page if the automated row fetch returns more than one row. I have a form with a primary and secondary key. If I search only on the primary key and there is more than one row I would like to call a popup with the multiple list, is this possible?
    Regards
    Mark

    Create a view on a table you want to update if you have more than two key values.
    However, the automated row fetch does support two key values.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Automated Row Fetch binding

    Hi Experts,
    Apex 4.1
    This is what i'm trying to do.
    I have number of fields in a form.
    Value for the Fields are fetched from two different tables using Automated Row Fetch.
    When the page loads only one ARF process would run based on a flag value in the application item and only those fields specific to that ARF should be populated.
    what i have noticed is when one ARF executed apex tries to bind all the fields on the form which have source type as Db column.
    in my case when it tries to bind a field which is basically populated by second ARF. it throws error message.
    What i what t know is,
    When we have multiple ARF on a page, is there any way to specifiy.. these fields are only populated by this ARF ?
    Really appreciate if someone can assisit me on this.
    Thanks
    T.kurubaran
    Edited by: Apex-Ape on Mar 29, 2012 1:12 AM
    Edited by: Apex-Ape on Mar 29, 2012 1:13 AM

    Apex-Ape wrote:
    what i have noticed is when one ARF executed apex tries to bind all the fields on the form which have source type as Db column. This is the expected behaviour of ARF processes.
    When we have multiple ARF on a page, is there any way to specifiy.. these fields are only populated by this ARF ?No.
    You should create custom row-fetch process to achieve this.

Maybe you are looking for

  • Print directly to the printer

    Hi Guys Could anyone correct me how can I print directly to the printer from this program ,I am getting short dump error when I select the radio button printer and execute it. Rgds PE

  • Version 10.2 freezes my computer and makes my screen melt

    Hi! I'm having trouble with my computer and the latest version of Flash. What happens is that everytime i get in contact with a flash-based media on the internet (Youtube, banners, games, etc.) my computer freezes and after 15 seconds it starts 'melt

  • Hoe to fetch Contact person for a vendor from BP no of the vendor?

    Hi all, Cna anyone tell me any FM  /table where i can find the contact person for a vendor once i pass the vendor business partner no ?

  • Verizon Online Backup and Sharing using FTP

    Can I access my Verizon Online Backup and Sharing 250MB with an FTP client instead of installing the backup software?

  • File Server files?

    We are 8 users who share files in our FILE SERVER. Some drag the files to their local hard drive, work on them, then drag them back to the FILE SERVER where the old file is replaced. Others work on files while "IN" the FILE SERVER. To say the least,