Unsaved new values disappear on table column sort

Guys,
I have an af:table.
I display row from a view object. One of them is from calculated attribute (attr1). I show attr1 on the table.
1. i create a new row on the table.
2. provide value to the attr1
3. sort the column of attr1
4. The value which was input in step 2 disappears.
How this can be resolved?

non - persistent value will not retains their values, you wont save those things.
someother way to retains the value in theri place until session kills.
1.take groovy support for the viewobject - attribute
2.take getter/setter method of viewobjectimpl.

Similar Messages

  • Trigger how to get new and old value for nested table column?

    Hi,
    I have created a nested table based on the following details:
    CREATE TYPE typ_item AS OBJECT --create object
    (prodid NUMBER(5),
    price NUMBER(7,2) )
    CREATE TYPE typ_item_nst -- define nested table type
    AS TABLE OF typ_item
    CREATE TABLE pOrder ( -- create database table
    ordid NUMBER(5),
    supplier NUMBER(5),
    requester NUMBER(4),
    ordered DATE,
    items typ_item_nst)
    NESTED TABLE items STORE AS item_stor_tab
    INSERT INTO pOrder
    VALUES (800, 80, 8000, sysdate,
    typ_item_nst (typ_item (88, 888)));
    Now I would like to create a trigger on table pOrder for after insert or update or delete
    and I would like to track the new and old value for the columns inside nested table.
    Can anybody direct me how to do it?
    I would like to know the sytax for it like:
    declare
    x number;
    begin
    x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
    end;
    Hope my question is clear.
    Thanks,
    Lavan

    Hi,
    Try like this:
    CREATE OR REPLACE TRIGGER PORDER_I
    BEFORE INSERT
    ON PORDER
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    DECLARE
      items_new typ_item_nst;
      ordid_NEW NUMBER;
    BEGIN
    FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price:  ' || :new.items(I).price );
    END LOOP;
    END;Regards,
    Peter

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • Get OLD&NEW value of an UPDATED column selected dynamically in a Trigger

    Hi All,
    I am writting a trigger which take column name dynamically. And on the basis of that column it should give me old value as well as updated value of a column corresponding to a modified row.
    OOO_SCHEDULE is my table name;
    Note: This is only for test so I am writting only for update not for insert and delete.
    create or replace trigger "OOO_SCHEDULE_AUDIT"
    BEFORE
    insert or update or delete on "OOO_SCHEDULE"
    for each row
    begin
    DECLARE
    v_username varchar2(30);
    AUDIT_EMP_ID varchar2(30);
    AUDIT_EMP_ID_NEW varchar2(30);
    v_Column_name VARCHAR(30);
    v_stmt1 VARCHAR(40);
    v_stmt2 VARCHAR(40);
    CURSOR C1 is
    select COLUMN_NAME from user_tab_columns where table_name='OOO_SCHEDULE';
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 into v_Column_name;
    EXIT WHEN c1%NOTFOUND;
    v_stmt1:=('OLD.'||v_Column_name);
    v_stmt2:=('NEW.'||v_Column_name);
    AUDIT_EMP_ID:=v_stmt1;
    AUDIT_EMP_ID_NEW:=v_stmt2;
    INSERT INTO TEMPTEST VALUES(v_stmt1);
    INSERT INTO TEMPTEST VALUES(AUDIT_EMP_ID);
    END LOOP;
    CLOSE c1;
    END;
    end;
    Suppose OOO_EMP_NAME is the column name where user made the change.
    If i do like this..
    AUDIT_EMP_ID:=OLD.OOO_EMP_NAME;
    AUDIT_EMP_ID_NEW:=NEW.OOO_EMP_NAME;
    Then it is working fine because I have given column name statically. But I want the column name to be selected dynamically and I am able to do it through cursor. Also I am able to fetch all column names in v_Column_name variable one by one dyanamically for the cursor.
    But by executing these statements
    AUDIT_EMP_ID:=v_stmt1;
    AUDIT_EMP_ID_NEW:=v_stmt2;
    I am getting OLD.OOO_EMP_NAME and NEW.OOO_EMP_NAME rather then old and new values of the updated column.
    Please help me identifying the problem, where I am doing the mistake? What is the correct way to execute these statements? So that I can get old and new values of the column (updated column).
    I have tried it by passing in a procedure also but don't know how to execute this dynamic statement to get the old and new values.
    Thanks,
    Ishrat.

    In the given link, column name has been selected statically. But i want that column name should be selected daynamically throgh loop and then check the
    condition for any update corresponding to that column value. I don't want to write as many if condition as the no. of column name. I just want one if condition for all column namesDon't be lazy. Write all column names into your trigger. Or use a way to create the trigger "dynamically".
    What is the problem that you have with static column names? "I don't want to write many..." is not a problem, but an opinion.

  • Adding new value in Pick list and sorted logic on basis of new value.

    Hi All,
    I have a requirement where I have to add a new value in seeded OAMessageBean and sort the page contents on basis of selected value.
    I see in about this page and found out that no VO is attached with this field.
    I assume that it attached somewhere in controller and tried to find out there but cannot able to find it there.Is there any way to find the VO which is attached to this bean?
    Also how to add a new values in this seeded picklist as I can able to get handle to OAMessageBean in custom controller.
    Please Help.
    Regards,
    889254

    Hi Peddi,
    Thanks a lot for your reply,
    I tried to open that page in jdeveloper but I dont see any choice bean on the page.Also tried to open CO attached to this page but no clue.As I am able to the get handle of this choicebean in controller.Is there any way I can find out which VO attached to this choiceBean.
    I tried using below depricated method and it is returning null
    messageField.getListViewObject();
    My another question is Can we add new value to choice bean In CO.
    I tried to add it by below methods but these are not reflecting in the application.
    messageField.addOption("TEMP");
    messageField.addIndexedChild("TEMP");
    Regards,
    889254

  • How can I add new values only to a column of a spreadsheet?

    I have three "while loops" that are executed in parallel, two generate values and the third while loop write the values in a spreadsheet.
    The run time of each while loop is different, to synchronize the three while loops I use a "Wait Until Next ms Multiple", but sometimes the same value is kept twice.
    I think that a solution would be to add a "Write To Spreadsheet File" in the blocks that generate values, adding a new value in the wished column in each cycle, but I do not know like doing this.
    I could keep the values in two arrays and add them in a same spreadsheet in different rows or columns, but I need save values in spreadsheet in each loop and not all values at the end of cycle.
    Thanks.
    German Garrigos.

    I think your three loops solution is probably better than putting different kinds of functions into one loop. Keeping data acquisition/generation separate from file i/o is usually better because the OS can interfere with timing on the file operations.
    If you pass the data to the file loop via queues, place the data into shift registers, and only write to the file when you have equal amounts of data from each generator you should be able to keep things synchronized. You can write larger or smaller amounts as necessary to keep pace with the generators. If one of the generators gets way ahead of the other, you have to decide how to deal with that issue.
    Writing to the second column of a three column spreadsheet can be tricky. It involves keeping pointers to the portions written and not written, reading the entire file into memory and overwriting the cells where new data goes and rewriting the entire file. This can get very slow for large files. If the file and data structures are simple enough it might be feasible to read only a portion of the file and overwrite it with new data, but that approach has lots of risks to the data.
    Wait until next ms multiple is only reliable if the wait interval is sufficiently longer than the execution time (including random OS delays) of each loop. Look at the synchronization functions such as notifiers to synchronize your loops.
    If you still have problems, post a simplified version of your program and someone will probably be able to suggest solutions.
    Lynn

  • Recursive query to calculate new value in a table.

    Hello folks,
    I have following data.
    drop table transactions;
    create table transactions
    ( ac varchar2(10), rec_seq int, tr_ref int, action varchar2(100), qty int );
    select * from transactions;
    insert into transactions values ('A1', 1, null, 'BUY', 1);
    insert into transactions values ('A1', 2, null, 'BUY', 4);
    insert into transactions values ('A1', 3, 1, 'TR to A2', -2);
    insert into transactions values ('A1', 4, null, 'SELL', -1);
    insert into transactions values ('A1', 5, 2, 'TR from A2', 2);
    insert into transactions values ('A1', 6, null, 'BUY', 5);
    insert into transactions values ('A1', 3, 3, 'TR to A3', -1);
    insert into transactions values ('A2', 1, null, 'BUY', 5);
    insert into transactions values ('A2', 2, null, 'BUY', 5);
    insert into transactions values ('A2', 3, null, 'BUY', 5);
    insert into transactions values ('A2', 4, 1, 'TR from A1', 2);
    insert into transactions values ('A2', 5, null, 'SELL', 2);
    insert into transactions values ('A2', 6, null, 'BUY', 1);
    insert into transactions values ('A2', 7, null, 'BUY', 1);
    insert into transactions values ('A2', 8, 2, 'TR to A1', -2);
    insert into transactions values ('A2', 9, null, 'sell', 3);
    insert into transactions values ('A2', 10, 4, 'TR from A3', 3);
    insert into transactions values ('A3', 1, null, 'BUY', 5);
    insert into transactions values ('A3', 2, 3, 'TR from A1', 1);
    insert into transactions values ('A3', 3, null, 'SELL', 2);
    insert into transactions values ('A3', 4, 4, 'TR to A2', -3);I the transactions table that holds the activity took place in a time. Below is some description of the table.
    1. rec_seq is the unique for each row within each AC value
    2. action column holds the nature of the activity
    3. tr_ref holds to link between the transfers. That is, source and destination of the transfers can be matched using this column.
    Now I want to write a query such that It returns the whole table with value of rec_seq changed in a recursive fashion that is
    1. Compare transfer records using tr_ref.
    2. Assign the greatest rec_seq to both the records.
    3. Recalculate the rec_seq of the following records from the new value. This recalculation to happen in a recursive fashion.
    Any hint/partial or full assistance in this will immensely help.
    Thank you.
    Girish

    Hi,
    Transfers are the key events in this problem. Every time there is a transfer, the new rec_seq number has to be adjusted. The new rec_seq value will be the greater of two numbers:
    (1) the req_seq of the last transfer in this ac, plus the number of other transactions in this ac since then, and
    (2) the req_seq of the last transfer in the other ac, plus the number of other transactions in that ac since then.
    (I assume a transfer always involves two different ac's. If not, the query below can be changed.)
    One way to approach this problem is to think of a directed graph, where every node is a transfer row, and it may have up to two parents:
    (1) the previous transfer in the same ac
    (2) the previous transfer in the other ac
    The query below constructs such a graph, then finds all the paths through that graph (in the sub-query named graph). It finds the longest path to each node (weighted by the number of rows between transactions). The main query references that number, and assigns consectuive new_rec_seqs starting with it.
    WITH     got_trs  AS
         SELECT     ac, rec_seq, tr_ref, action, qTy
         ,     LAST_VALUE (tr_ref IGNORE NULLS)  OVER ( PARTITION BY  ac
                                                           ORDER BY      rec_seq
                                            ROWS BETWEEN  UNBOUNDED PRECEDING
                                             AND  1            PRECEDING
                                           )        AS prev_tr
         ,       LAST_VALUE (tr_ref IGNORE NULLS)  OVER ( PARTITION BY  ac
                                                           ORDER BY      rec_seq     DESC
                                                 )        AS next_tr
         FROM    transactions
    --     WHERE     ...     -- if you need any filtering, put it here
    ,     got_tr_cnt     AS
         SELECT     got_trs.*
         ,     COUNT (*) OVER ( PARTITION BY  ac
                                  ,            next_tr
                          )    AS tr_cnt
         FROM    got_trs
    ,     nodes     AS
         SELECT     ac
         ,     tr_ref
         ,     tr_cnt
         ,     ac          AS parent_ac
         ,     prev_tr          AS parent_tr
         FROM     got_tr_cnt
         WHERE     tr_ref     IS NOT NULL
        UNION
         SELECT     s.ac
         ,     s.tr_ref
         ,     o.tr_cnt
         ,     o.ac          AS parent_ac
         ,     o.prev_tr     AS parent_tr
         FROM     got_tr_cnt     s
         JOIN     got_tr_cnt      o  ON     s.tr_ref     = o.tr_ref
                           AND     s.ac          != o.ac
         WHERE     o.prev_tr        IS NOT NULL
    ,     graph     AS
         SELECT     tr_ref
         ,     MAX ( LENGTH ( REPLACE ( SYS_CONNECT_BY_PATH ( LPAD ('.', tr_cnt, '.')
                    )     AS start_pt
         FROM     nodes
         START WITH     parent_tr     IS NULL
         CONNECT BY     parent_tr     = PRIOR tr_ref
              AND     parent_ac     = PRIOR ac
         GROUP BY     tr_ref
    SELECT       t.ac
    ,       t.rec_seq
    ,       t.tr_ref
    ,       t.action
    ,       t.qty
    ,       NVL ( g.start_pt
               , 1
               ) + ROW_NUMBER () OVER ( PARTITION BY  ac
                                            ,          NVL ( t.tr_ref
                                                    , t.prev_tr
                                            ORDER BY          rec_seq
              - 1     AS new_rec_seq
    FROM           got_trs  t
    LEFT OUTER JOIN      graph       g  ON  g.tr_ref     = NVL ( t.tr_ref
                                                       , t.prev_tr
    ORDER BY  t.ac
    ,            t.rec_seq
    ;Output:
    AC    REC_SEQ TR_REF ACTION     QTY NEW_REC_SEQ
    A1          1        BUY          1           1
    A1          2        BUY          4           2
    A1          3      1 TR to A2    -2           4
    A1          4        SELL        -1           5
    A1          5      2 TR from A2   2           8
    A1          6        BUY          5           9
    A1          7      3 TR to A3    -1          10
    A2          1        BUY          5           1
    A2          2        BUY          5           2
    A2          3        BUY          5           3
    A2          4      1 TR from A1   2           4
    A2          5        SELL         2           5
    A2          6        BUY          1           6
    A2          7        BUY          1           7
    A2          8      2 TR to A1    -2           8
    A2          9        sell         3           9
    A2         10      4 TR from A3   3          12
    A3          1        BUY          5           1
    A3          2      3 TR from A1   1          10
    A3          3        SELL         2          11
    A3          4      4 TR to A2    -3          12I don't recommend trying to store this number in the table; it will be a nightmare trying to keep it up to date. However, if you do want to store it in the table, you can use something like the query above in a MERGE statement.
    When trying to understnad any quiery that uses sub-queries, it can be helpful to run the individual sub-queries by themselves, and study the output.

  • Af:table column sort icon does not appear

    Hi,
    if I use the declarative way to handle column sorting the tablecolumn gets a icon which indicates sorting.
    For one column I have to set the sorting programmatically by using CoreTable's setSortCriteria method .
    In this case the sort icon doesn't appear!? Is that right?
    regards, Florian

    thanks Frank!
    It's not a question of enable/disable the sorting feature of the table column.
    It's about the requirement to sort the column like in this sql statement:
    select c1 || c2 || c3 as c123
    from myTable
    order by c1, c2, c3 asc;
    The column is sortable by default (column data is concatenated like in c123).
    I use following code in the SortListenerMethod to enable the sorting for the requirement above:
    CoreTable ct = this.getMyTable();
    List<SortCriterion> critlist = new ArrayList<SortCriterion>();
    boolean sortOrderAsc = true;
    critlist.add(new SortCriterion("c1", sortOrderAsc));
    critlist.add(new SortCriterion("c2", sortOrderAsc));
    critlist.add(new SortCriterion("c3", sortOrderAsc));
    ct.setSortCriteria(critlist);
    using this always prevent the sortIcon from showing.
    On the other hand my sortIcon comes up using the declarative way.
    Or is there a way to accomplish the sorting above by using other ways?

  • Summing values in dynamic table columns

    I'm having some difficulty figuring out how to sum column
    values in dynamic tables. In other words, I have created a dynamic
    table (php/mysql). One column has a list of prices, and I need to
    sum the list of prices. I know this is pretty simple stuff. Can
    someone direct me to an example of the appropriate code?

    "firalivet" <[email protected]> wrote in
    message
    news:go1j76$d4l$[email protected]..
    > One column
    > has a list of prices, and I need to sum the list of
    prices. I know
    > this is
    > pretty simple stuff.
    There are several ways to do this, but a simple way is to
    create a
    variable to hold a running total and add the current price to
    it when
    you display each row. The following is a simplified example
    of the
    code:
    <?php $total = 0; ?>
    <?>php do { // this is the start of the repeat region
    ?>
    <tr><td><?php echo
    $row_recordsetName['price']; $total +=
    $row_recordsetName['price']; ?></td></tr>
    <?php } while ($row_recordsetName =
    mysql_fetch_array($recordsetName)); // end of repeat region
    ?>
    <tr><td><?php echo $total;
    ?></td></tr>
    David Powers
    Adobe Community Expert, Dreamweaver
    http://foundationphp.com

  • Server 2010 SP2 - New values in lookup table are not updated in the user client

    Hello,
    I added a value to a lookup table in the PWA.
    Most users see the new value in the field based on this lookup table.
    One user doesn't see the update for 2 weeks now. He did close and opened the application over these 2 weeks.
    Any Idea?
    Thanks,
    Barak

    Hi Barak,
    I am assuming the issue is with PWA? Has the user tried to access PWA from a different machine/browser?Other things you can try are:
    - Reset IE settings
    - CTRL+F5 (on the page)
    If it is MS Project that doesn't have the new value, try closing MS Project and re-open it
    Hope this helps
    Paul

  • Data pump + inserting new values in a table

    Hello Everybody!!
    My question is : is it possible to insert new row into a table which is included in running DataPump process (export data) ?
    Best regards
    Marcin Migdal

    Have a look here, never done it myself but seems kind of cool :)
    http://www.pythian.com/blogs/766/oracle-data-pump-11g-little-known-new-feature

  • Oracle Alert: Access before and after update values of a table column

    We have a requirement where a notification needs to be sent when 'END_DATE' attribute (column in a table X) is set, in an Oracle Applications form.
    I have defined an Event based Oracle Alert which fires 'On Update' of the table X.
    Could anyone please let me know as how to access the value of 'END_DATE' before and after update (i.e :new.END_DATE and :old.END_DATE) in the sql query of the alert.
    The need to use the before update and after update values of the attribute 'END_DATE' is that if we add the condition END_DATE is not null, the alert is sent even if any other attrbutes are updated in the Oracle form which is not the intended behavior.
    Appreciate any help.
    Thanks

    Hi
    use selectionlistener for your first table then add clientlistener and serverlistener so that you will get the rows on click in back bean.
    then get second table vo and and create and add row for that view object. add partial target to refresh your second table from back bean.
    on click of save call commit operation.

  • Trigger is not updateing the :new value in the table

    Hi,
    I've greated a row trigger that will trigger on insert statements.
    The last thing the trigger will do is to update the :NEW.role_id value in the inserted row, see the trigger bellow.
    The trigger was mutation so I had to add the 'PRAGMA AUTONOMOUS_TRANSACTION;' to avoid the mutation error.
    When performing test with controlled insert statements the trigger is working without problems, but when I my J2EE application is inserting rows to the table the role_id value is nog updated, see the trigger below and the :NEW.role_id := nRole_id; part. The role_id for the new row is empty. What can be the problem?
    CREATE OR REPLACE TRIGGER MSP_36.M2_USER_ALERT_INSERT_TRG_SCA
    BEFORE INSERT
    ON MSP_36.M2_USER_ALERT
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    ex_not_valid_role_name EXCEPTION;
    /* Variables */
    nAlertTypeId M2_USER_ALERT.alert_type%TYPE;
    isLogical      boolean;
    validRole     boolean;
    nRole_id      M2_ROLE.role_id%TYPE;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
         BEGIN
              SELECT distinct at.alert_type INTO nAlertTypeId
              FROM M2_USER_ALERT ua, M2_ALERT_TYPE at,M2_ALERT_TYPE_PROPERTIES atp
              WHERE ua.alert_type = at.alert_type
              AND at.alert_type = atp.ALERT_TYPE_ID
              AND ua.alert_type = :NEW.alert_type
              AND upper(atp.property_name) = 'LOGICAL'
              AND upper(atp.property_value) = 'TRUE';
              isLogical := true;
         EXCEPTION
                   WHEN no_data_found THEN
                   isLogical := false;
                   NULL;     
         END;     
    IF (isLogical = true) THEN
    BEGIN
              SELECT distinct ro.role_id INTO nRole_id
              FROM M2_ROLE ro, M2_USER_ALERT
              WHERE ro.name = :NEW.name;
         EXCEPTION
                   WHEN no_data_found THEN
                        validRole :=false;
                        RAISE_APPLICATION_ERROR(-20001,'LOGICAL UserAlert: Role with id'|| nRole_id || ' does not exist.');     
                        NULL;
         END;
         validRole := true;
         IF (isLogical = true AND validRole = true AND :NEW.status = 1) THEN
         INSERT INTO M2_USER_ROLE (user_id,role_id)
         VALUES (:NEW.user_id,nRole_id);
         :NEW.role_id := nRole_id;
    END IF;
    END IF;
    commit;
    END;
    Many thanks,
    Michael

    I only get a empty column that include now data. The first insert is working correct so I know that the role_id is valid and working. Can there be problem with commit or my AUTONOMOUS_TRANSACTION running this from JDBC ?
    EXAMPLE data from
    M2_USER_ROLE
    ===================
    USER_ID = ROLE_ID =
    ===================
    20 = 10040 =
    1259756 = 10040 =
    ===================
    Example partly data from
    M2_USER_ALERT
    =========================================================
    USERALERT_ID = USER_ID = ALERT_TYPE = NAME = ROLE_ID =
    =========================================================
    3725 = 1259756 = 10288 = MG_Test = =
    =========================================================
    When inserted from the application the role_id is empty and I've taken the same SQL from the library cache and run it with same BIND variables and then it's working.
    Michael

  • How to dynamically get default value from a table column

    Hi all,
    Here's my problem: Our front end application sends insert and update queries to a pl/sql package. I've got a procedure that gets a PL/SQL table with all the column names an values, a table-name and a primary key name and value. That procedure creates an insert or update statement. So far, so good.
    Now the problem: our front end doesn't know what the default value for a column is. So when a number field doesn't get a value in the front-end, it's inserted with a value '0' though is should ben NULL. My sollution for this is to know the default value of a column: when there's a default of '0', then the value that will be inserted is '0'. When there's no default value and the column can ben NULL, it'll be inserted as NULL. if the column has a not null constraint, a '0' will be inserted.
    Ofcourse I can get the default value from the system-views all_tab_columns or user_tab_columns, but our application is installed at some 100 clients, and has various database installations. Most of the times, the tables are in the same schema as our procedure that performs the insert or update, but sometimes some of the tables are in another schema (in the same database) and also sometimes some tables are stored in another database. In all these situations, a synonym for that table exists in the schema.
    Is there a api function or procedure that I can call to get the default value of a column? I looked at dbms_sql and dbms_metadata, but those packages don't give me that perticular information. if not, I'll stuck with the 'does table exists in schema' yes->use table, no query user_synonyms to look for the owner of the table (and database link) and query all_tab_columns to get the default value. Only this seems a bit overkill to me.
    I hope I'm clear enough? And please don't reply with "don't do inserts this way"! I know, this is not the most optimal sollution, but it does gives us a couple of advantages in our application...

    there is no way that I can think of, apart from what you have already discovered (i.e. views), where you can determine if a column has a defuault value defined against it.
    The other option is triggers, but I guess doing that across 600 tables would not be an option, and besides I stay clear of triggers.
    A different approach therefore, if you cannot pre-determine the data, is to consider a post problem handler, hence I suggested the use of an exception handler.
    The exception handler works regardless of whether the statement is dynamic or not.
    SQL> truncate table abc;
    Table truncated.
    SQL>
    SQL> declare
      2    NULLVAL exception;
      3    pragma exception_init(NULLVAL, -01400);
      4 
      5  begin
      6 
      7    begin
      8 
      9      execute immediate 'insert into abc (y) values (1)';
    10 
    11      exception
    12        when NULLVAL then
    13          -- handle the error
    14          execute immediate 'insert into abc (x,y) values (0,1)';
    15 
    16    end;
    17 
    18    commit;
    19   
    20  end;
    21  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from abc;
             X          Y
             0          1

  • How to persist af:table column sort state within a session?

    Hi,
    I have an af:table in my page with the columns sortable="true".  So when click on the header of any column, we can sort the column.  Our users have a requirement that after they do the sort by clicking one of the column headers in the af:table, then they navigate to another page in our application and then come back to this page, they want to see the same sort order of data.  How can we persist the sorting state in af:table?
    Any comments are appreciated.
    Thanks
    -Mina

    Hi,
    I am not sure this is doable because the underling data collection may be changed on other views. You can use a sort listener and intercept the sort order selected by a user to persist it in the session or else where (keep in mind that using the panelCollection component you could also have a sort order that spans multiple columns). When you navigate back to the view you then have the information to order the data accordingly.
    Frank

Maybe you are looking for

  • I keep trying to update but  Keep getting message that network connection timed out. What shall I do, I do not know how to disconect my firewall

    Trying to update ipad2 software. Keep getting message that network connection timed out. Don't know how to cancel the firewall

  • Dev qas and prd set up with different clients

    good day experts, If I have 3 different clients in PRD, is it recommended to have 3 qas and 3 dev clients as well? For instance, 3 clients in PRD which are 500, 510, and 520; do I have to have 300,310,320 for qas and 200, 210, and 220 for dev? for we

  • IDoc  in Ststus 51

    Hi   One of our customer sends requested delievery date at item level. So when PO comes in the IDOC is errored out at status 51 and giving us the following message: Field RV45A-ETDAT (1) does not exist in the screen SAPMV45A 4001 Any help is highly a

  • Content.load("directory path");

    Hi..I have a flash file using a textarea component that brings in XML data. I'm running into an issue that involves my XML and CSS file residing on a different server. The ".load" command seems to only read a directory path. I think I need a command

  • Release of XE

    Hi. I'm confused about some messages in this forum about the end of beta license of Oracle XE and some other resources telling that release version of XE will be at end of january. Please someone tell me: 1. XE will still work after 31.01.06 or has t