Correct way to handle updates of XMLtype columns in standard tables.

Hello to whoever may read this,
I am currently studying the XML functionality of oracle DB for a uni project.
We have been asked to compare/contrast solutions to publishing product and price data for data stored in standard relational tables, and data stored in XML type tables. For extra marks, i am looking at a table containing an XMLType column for multiple items of data relating to the primarykey.
I have managed to get my head around publishing the data - pretty straight forward, but we have also been asked to show how we can update data, which isn't a problem within the standard tables/columns, but when it comes to the XMLType columns/tables, i dont have a clue.
At the moment i am working on trying to update an XMLtype column. The table itself is a "product" table, and contains product information, as well as an XMLType column containing multiple changes to the prices. In the relational tables, this "product" table has a one-to-many link to another table called price_history which contains details about past prices (which is populated by a trigger on update/insert of a new price). But in this table all the product changes are stored in XML format in the XML type column "prices".
Table columns: id number(4), name varchar2(25), prices xmltype;
example data: 1781, CDW 20/48/E, <product_prices><price_change>
<change_id>1</change_id>
<date_changed>2009-10-13</date_changed>
<details>price increased</details>
<new_value>234</new_value>
</price_change>
<price_change>
<change_id>2</change_id>
<date_changed>2009-10-13</date_changed>
<details>price increased</details>
<new_value>235</new_value>
</price_change></product_prices>
We need to give examples of an update. I have been looking around the net, and these forums for a solution now for about 4 hours. My own thoughts are that to update this with a new price change i need to, SELECT the current data INTO a variable, then concatenate that variable with the new price change info e.g.
<price_change>
<change_id>3</change_id>
<date_changed>2009-10-13</date_changed>
<details>price decreased</details>
<new_value>230</new_value>
</price_change>
then insert that whole chunk of data again to overwrite the old data.
Now im fairly certain there is some function somewhere which will allow me to do this update/insert operation without going through this process... After i am done with this update of XMLType column data, i need to tackle updating data in an XMLType Table with XQuery(? apparently), so if you have any pointers for that please let me know.
Could one of you experts point me in the right direction for this? Any advice at this stage is a great help and will stop me losing my mind.
p.s. im sorry about the lengthy description of the problem/solution required. How to describle something i dont understand? I ask myself.

Hi,
You really need to take a look at the XMLDB Developers guide.
For updating XML with SQL/XML see UPDATEXML and for XQuery see [Using XQuery with Oracle XMLDB|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb_xquery.htm#sthref1673]
HTH,
Chris

Similar Messages

  • What's the best way to handle the growth of the mdm.tblTransaction table?

    Can anyone suggest a good way to handle the growth of the mdm.tblTransaction table? This table logs all the MDS transactions and the history of the data residing in it is required for auditing purposes. Hence we can't delete this data. I'm looking for options
    on how we can maitain this table ongoing. It is going to perform badly eventually. We currently have 15 Million transactions in this table.
    What options can we look at?

    In the vnext sql server, MDS will support cleaning based on log retention policy.
    In the sql2014/sql2012, you have to clean up the table manually.
    An sample sproc that can be reused is attached below.
    ==============================================================================
    Copyright (c) Microsoft Corporation. All Rights Reserved.
    ==============================================================================
    SELECT * FROM mdm.tbl_7_TR where LastChgDTM < '2014-10-22';
    EXEC mdm.udpLogCLeanup 7, '2014-10-22';
    SELECT * FROM mdm.tbl_7_TR where LastChgDTM < '2014-10-22';
    CREATE PROCEDURE mdm.udpTransactionsCleanup
    @Model_ID INT,
    @CleanupOlderThanDate DATE
    WITH EXECUTE AS N'mds_schema_user' -- Execute as a user that has permission to select on [tblUserGroupAssignment], [tblBRBusinessRule], [udfSecurityUserBusinessRuleList]
    AS BEGIN
    SET NOCOUNT ON
    DECLARE
    @SQL NVARCHAR(MAX)
    --Annotation table names
    ,@TransactionTableName sysname
    ,@AnnotationTableName sysname;
    SET @TransactionTableName = 'tblTransaction';
    SET @AnnotationTableName = 'tblTransactionAnnotation';
    BEGIN TRY
    --Delete all Annotations on transactions being deleted issues
    SET @SQL = N'
    DELETE [mdm].' + QUOTENAME(@AnnotationTableName) + N'
    FROM [mdm].' + QUOTENAME(@AnnotationTableName) + N' as tannt
    JOIN [mdm].'+ QUOTENAME(@TransactionTableName) + N' as txn ON tannt.Transaction_ID = txn.ID
    JOIN [mdm].[tblModelVersion] as tmv ON txn.Version_ID = tmv.ID
    WHERE tmv.Model_ID= @Model_ID AND txn.LastChgDTM <= @CleanupOlderThanDate
    EXEC sp_executesql @SQL, N'@Model_ID INT, @CleanupOlderThanDate DATE', @Model_ID, @CleanupOlderThanDate;
    --Delete all transactions older than the specified date
    SET @SQL = N'
    DELETE [mdm].' + QUOTENAME(@TransactionTableName) + N'
    FROM [mdm].' + QUOTENAME(@TransactionTableName) + N' txn
    JOIN [mdm].[tblModelVersion] tmv ON (txn.Version_ID = tmv.ID)
    WHERE tmv.Model_ID = @Model_ID AND txn.LastChgDTM <= @CleanupOlderThanDate
    EXEC sp_executesql @SQL, N'@Model_ID INT, @CleanupOlderThanDate DATE', @Model_ID, @CleanupOlderThanDate;
    RETURN(0);
    END TRY
    --Compensate as necessary
    BEGIN CATCH
    -- Get error info
    DECLARE
    @ErrorMessage NVARCHAR(4000),
    @ErrorSeverity INT,
    @ErrorState INT;
    EXEC mdm.udpGetErrorInfo
    @ErrorMessage = @ErrorMessage OUTPUT,
    @ErrorSeverity = @ErrorSeverity OUTPUT,
    @ErrorState = @ErrorState OUTPUT;
    RAISERROR(@ErrorMessage, @ErrorSeverity, @ErrorState);
    --On error, return NULL results
    --SELECT @Return_ID = NULL;
    RETURN(1);
    END CATCH;
    SET NOCOUNT OFF
    END --proc
    GO

  • Correct way to handle the updated object

    Hi,
    I have a thread, test2.java, that periodically update a object that pass from test.java. In test.java, the "data" object need to be most updated coz this object is used in other thread also. I can ensure that only test2.java do the write, others threads are read only.
    My question is: I can write some dirty code to do what I want. But for a programmer, I want to know the formal, oo way to handle this situation.
    Thanks.
    Tommy
    public class test{
    data d;
    test2 t2;
    public test(){
    d = new data(1, getClass().toString());
    t2 = new test2(d);
    t2.start();
    public void runServices(){
    while(true){
    //If i don't do anything, the following code only print out
    //the instance that i init. here.. Not the updated one
    System.out.println(d.toString());
    try{
    Thread.sleep(5000);
    }catch(InterruptedException ex){}
    public static void main(String[] args){
    test t = new test();
    t.runServices();
    * This class will periodically update the "data" object that
    * passed from test.java
    public class test2 extends Thread{
    int count = 1;
    data d;
    public test2(data a){
    this.d = a;
    public void run(){
    while(true){
    d = new data(count++, getClass().toString());
    System.out.println(d.toString());
    try{
    sleep(5000);
    }catch(InterruptedException ex){}
    public class data{
    int count;
    String s = "";
    public data(int a, String b){
    count = a;
    s = b;
    public String toString(){
    return s + " count:" + count;

    Sorry nearly missed that :(
    You should try to modify the instance of data you have been given in the constructor for test2 instead of creating a new object:
    * This class will periodically update the "data" object that
    * passed from test.java
    public class test2 extends Thread {
      int count = 1;
      data d;
      public test2(data a) {
        this.d = a;
      public void run() {
        while(true) {
          d.refreshWith(count++, getClass().toString());
          System.out.println(d.toString());
         try {
           sleep(5000);
         } catch(InterruptedException ex){}
    }

  • Ora-21700 when updating xmltype column of a table

    Hello,
    Can somebody explain why the following statement gives ora-21700 (object does not exist or is market for delete):
    update translation_message
    set translationxml = XmlType(
    '<NPSREPLY DOMAIN="SWI" OBJECT="SUBSCRIBER" REQUEST="DELETE" RETURNCODE="0" RETURNTYPE="NONE" STATUS="STORED" xmlns="http://saly.bc/nps/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd">
    <SUBREQUEST SEQUENCE="1">
    <ProfileData>
    <ACTION SUBTYPE="PSTN">DEL_CNA_FREE</ACTION>
    <DN>999999999</DN>
    <RETURNCODE>0</RETURNCODE>
    </ProfileData>
    </SUBREQUEST>
    </NPSREPLY>'
    where id = 1926938
    remark:
    when changing
    xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd
    in
    xsi:schemaLocation="http://saly.bc/nps/NPS_Reply.xsd
    the select is running well.
    I will explain my problem a little bit more:
    The exact oracle error is:
    ora-21700 object does not exist or is marked for delete ORA-06512: at "SYS.XMLTYPE".
    The following peace of xml causes the problem:
    xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd"
    The statement is running fine if you remove the blank after
    "/nps/ NPS_Repy". So if you use this peace of xml xsi:schemaLocation="http://saly.bc/nps/NPS_Reply.xsd", the statement works fine.
    My question: Wy is the blank not allowed in this peace of xml xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd"
    The purpose of the blank is to indicate that 'NPS_Reply.xsd' will be located somewhere in "http://saly.bc/nps/". So it can be that 'NPS_Reply.xsd' is found directly under "http://saly.bc/nps/" or some levels lower. According XML standards, the blank is allowed for this purposes.
    regards, Els

    Hi,
    This schema location is only indicative and not used. The xml is generated by an other application and has to be stored in an xmltype column.
    regards, Els

  • What's the correct way to handle changes in RDBMS/DBadapter?

    In my project all changes to the database are not done via Jdeveloper but via TOAD. This means DBadapters must be made aware of changes in the database.
    I tried to re-run the DBad.apter wizard twice (2 different services) - to make it aware of changes in the DB. Both times it failed. I think was after the import database tab. The next tab was just blank.
    So what's the correct way of reconile changes in the db backwards into Jdev?
    BTW, in the DBadapter wiz its not possible the remove a already imported table. How do I come across the situation where I want the DBadapter to point to af different table? - and possibly remove old references to another one - which might have been removed in the DB.
    As It is now - I have to re-work all my DBadapters, which is not very much fun...
    Rgds, Henrik

    Trust me, I hv done that umpteen nbr of times.
    I hate BA's coming to me with changes, for which I hv to modify the DB adapter.
    One big loop-hole with BPEL is if we try to modify the adapters/toplink, it doesnt tend to work properly.
    The manthra for such modifications is ... "recreate", which is definetely not a good practise.
    You may not like but gottu live with it, my friend.
    Pointing to a different table, I achieve it by doing a "Shift+Delete" to all the references of the old table in the BPEL project ... :|
    There isnt a specific provision in the wzd (I am not sure of the latest version, though).

  • Updating a derived column of a table

    Hi everyone,
    Can you please help me and give me a solution for this
    I have 3 columns paydate, expdate, NewRenew in a table.  If the paydate is greater than 90 days than exp date I need to update NewRenew column to N and If the paydate is less than 90 days than exp date I need to update NewRenew column
    to R.
    In simple terms as in the code below, if the column D in the query is less than 90 newrenew column should be 'R' otherwise 'N'
    Below is the sample data to create and insert. when I use the update as I am using it is updating all the rows in the table.
    create table test_3
    (Accnt_no int,
    expdate date,
    paydate date,
    newrenew varchar(1)
    insert into test_3 (Accnt_no,expdate,paydate,newrenew)
    select 1859,'20150131','20150221','N'
    UNION ALL
    select 3549,'20150219','20150302','N'
    UNION ALL
    select 9185,'20140910','20150123','N'
    UNION ALL
    select 11302,'20140910','20150317','N'
    select * from (select DATEDIFF( DAY, convert(date,expdate),CONVERT(date, PAYDATE)) D,* from Test_3
    WHERE convert(date,paydate) > convert(date,expdate)) z
    where Z.D>90
    ----am trying to update in this way but it is updating all the rows in the table instead of 2 rows.
    update Test_3
    set newrenew = 'R'
    from (select DATEDIFF( DAY, convert(date,expdate),CONVERT(date, PAYDATE)) D,* from Test_3
    WHERE convert(date,paydate) > convert(date,expdate)) z
    where Z.D<90

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> I have 3 columns pay_date, expiry_date, renewal_flg in a table.<<
    No, you do not have a table. A table has a key by definition. What you did post is awful. An accounting number is an identifier and you do no math on it, so it should never be a numeric. We do not use flags in RDBMS! That is assembly language programming. SQL
    is a logical predicate based language that computes a state of being as part of a query. Your mind set is still in punch cards and mag tapes where we had to physically mark things in hardware. That is your assembly language renewal flag – a hole in the last
    column of a 1950's punch card in 2015 SQL Then the punch cards are passed to the next step in the sequence of procedural steps. 
    We now have modern INSERT INTO syntax and CAST() in place of the old Sybase CAST() string function. The old Sybase UPDATE..FROM.. does not work! Google it. The ANSI/ISO Standard SQL uses only the “yyyy-mm-dd” style date display format; what you had will also
    work in T-SQL, but might not port and makes you look like a dialect speaker. 
     CREATE TABLE Test_3
     (account_nbr CHAR(16) NOT NULL  PRIMARY KEY, -- typical credit card length
      expiry_date DATE NOT NULL, 
      pay_date DATE NOT NULL);
    Here is the correct syntax for insertions since the SQL-92 standards:
     INSERT INTO Test_3 (account_nbr, expiry_date, pay_date)
    VALUES
     (1859, '2015-01-31', '2015-02-21'), 
     (3549, '2015-02-19', '2015-03-02'), 
     (9185, '2014-09-10', '2015-01-23'), 
     (11302, '2014-09-10', '2015-03-17');
    Why did you cast (well, you did it with CONVERT() instead) a date to date? Why did you use “SELECT *” in production code? Is this what you meant?
    CREATE VIEW Old_Accounts_Test_3
    AS
    SELECT account_nbr,  expiry_date,  pay_date,
                DATEDIFF(DAY, expiry_date, pay_date) AS account_age
      FROM Test_3
     WHERE pay_date  > expiry_date  -- is it >= or >?? 
        AND DATEDIFF(DAY, expiry_date, pay_date)  > 90;
    This view is always current, required no disk writes, etc. I have been teaching SQl for a few decades, and I have see this mindset before.  You are 3-5 years away from actually being an SQL programmer. You need to do a lot of un-learning. The bad news
    is that if you keep coming to forums, people will feed you kludges and you will never learn. Be better than that.  
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Update a single column of a table

    Hi Champs,
    I want to update a single column of table PA0000.
    Following is ABAp code I am using:
    UPDATE pa0000 SET massn = wa_upd_actn71-massn
                       WHERE pernr = wa_upd_actn71-pernr AND
                              massn = c_crct_entry.
    where in current scenario wa_upd_actn71-massn = 54,
                                         wa_upd_actn71-pernr = 10005092,
                                         c_crct_entry = 71.
    But this code is not working and note updating the DB table PA0000.
    Can you help me out?
    Edited by: Nishant Khimesra on Apr 7, 2009 2:00 PM
    Edited by: Nishant Khimesra on Apr 7, 2009 2:00 PM

    hiii,
    If u want to update it thr program then write the query as update <dbtablename> set fld = value where <condn>. make sure that the values u pass are converted as per the values in database.
    2nd way is goto se16n
    specify table name and then enter &sap_edit on command line. sap editing function will be edited. specify the filter parameters on the field and then execute the transaction. u can change thd data instantly as the data appears in editable alv.
    Regards,
    Anil N.

  • Updating one varray  column in a table

    Hi ,
    We are using 10gR2 on AIX . I have one varray column in a table which has be updated ..To update this column , data is fetched in a query by using 2 tables.Is there any way to reduce the update time?
    Edited by: Minu on 25-Apr-2011 20:24

    HOW TO: Post a SQL statement tuning request - template posting

  • Need to update a single column in a table with some other column value

    Hi experts,
    I was about to change one column data type in a table. Then I renamed that column name to "old_column_name" . Later I added new column name with required datatype( My case its NCLOB). Now I want to update the new column value with old column value.I mean i have to copy the data. But data amount is very huge. Its more than 1.5 crores of data. But on promote day, I have only 1 hr of outage. Please suggest the effective solution to achieve this.

    Hi Stew
    I have 1 primary key in my table and 11 foreign keys in my table.there are 20 check constraints as well.
    If i go for an online redefine of a table, these objects will be created back automatically?
    Please clarify.
    This is my table. Here Remarks is the column with CLOB datatype. To support multi language, I need to change it to NCLOB. That column having data so i cant rename it.
    So I added new column , after renaming that remarks to old_remarks. Now new column remarks is ready with NCLOB data type, but no data in it.
    To copy the old remarks column into new remarks column, i thought to write one script. But how it is achievable using "DBMS_REDEFINITION". Please explain me,
    create table XXXXXXXXXX
    ID NUMBER(8),
    COMPLETED_DATE DATE,
    COMMUNICATION_MEDIUM VARCHAR2(32),
    REMARKS1 VARCHAR2(4000),
    COPY VARCHAR2(1),
    IO_MARKER VARCHAR2(3),
    EVENT_DATE DATE,
    CON_REF_NO NUMBER(8),
    DEP_CODE VARCHAR2(6),
    SFM_STAFF_NO NUMBER(8),
    CRPD_ID NUMBER(8),
    CRPD_ID_COPY NUMBER(8),
    STATUS VARCHAR2(2),
    COMEBACK_NO NUMBER(2),
    ADD_ADD_ID NUMBER(10),
    AEV_ID NUMBER(8),
    OLAY_ID NUMBER(8),
    COE_TYPE VARCHAR2(3),
    CET_CODE VARCHAR2(6),
    DEP_CODE_RAISED_BY VARCHAR2(6),
    SFM_STAFF_NO_RAISED_BY NUMBER(8),
    USR_CREATED VARCHAR2(30),
    CREATED DATE,
    USR_CHANGED VARCHAR2(30),
    CHANGED DATE,
    EXT_REF_ID VARCHAR2(150),
    REPLY_EXPECTED_DATE DATE,
    SEC_ID VARCHAR2(8) not null,
    PROTECTED VARCHAR2(1),
    APPROVED_BY NUMBER(8),
    DOCUMENT BLOB,
    OLD_REMARKS CLOB,
    CTS_ID NUMBER(8),
    MESSAGE_STATUS VARCHAR2(4),
    WORD_DOCUMENT NCLOB,
    REMARKS NCLOB
    Edited by: Hema on Jul 2, 2012 8:31 AM
    Edited by: Hema on Jul 2, 2012 8:31 AM

  • How to update a BLOB column in a table with a file in local machine?

    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard. Appreciate your help.
    Regards
    Walter Nicholas

    user447427 wrote:
    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard.That's the client's job to read data on the client PC (from keyboard/mouse/scanner/file/whatever input) and submit that to the database server for processing and/or storage.
    You cannot expect the server to hack into your PC and lift that data in the file from your disk. Not that is not technically possible. You can wire rockets onto a bicycle to make it go faster, but that's not a wise thing to do. Similarly, it is not a bright idea to ignore the very basics of client-server.
    Bottom line - you need client s/w on your PC to load the content of that file into Oracle. It can be done using SQL*Loader as already suggested. It can be done using a web browser (submitting it via HTTP to web-enabled PL/SQL code). You can use FTP or WebDav and upload into Oracle's XDB (XML database).
    Your requirements will determine what client to use. Once off load? SQL*Loader is very easy to use for loading XML files into the database.

  • How to update the COST column using another table's column

    Dear All,
    I have table:
    table parts: pno, pname, qoh, price, olevel
    table orders: ono, cno, eno, received, shipped
    table odetails: ono, pno, qty
    view:orders_view: ono, cno, eno, received, shipped,sum(qty*price)order_costview:odetails_view: ono, pno, qty, (qty*price)cost
    after I update the price in parts, I need to update COST and ORDER_COST too. The orders_view does not have pno, qty, and price, the odetails_view does not have price, how can I update the COST and ORDER_COST. Please help and Thanks in advance!!!
    I wrote the update the price in parts:
    create or replace procedure change_price(ppno in parts.pno%type, pprice in parts.price%type) as
    begin
        update parts
        set price = pprice
        where pno = ppno;
    end;
    show errorsthis procedure works fine.
    I wrote the trigger:
    create or replace trigger update_orders_v
    after update of price on parts
    for each row
    begin
        update orders_view
        set order_cost = sum(parts.(:new.price)*parts.qty)
        where parts.pno = :new.pno;
    end;
    show errorsIt gives me:Errors for TRIGGER UPDATE_ORDERS_V:
    LINE/COL ERROR
    3/5 PL/SQL SQL Statement ignored
    4/22 PL/SQL ORA-00934: group function is not allowed hereplease help!

    You could add the columns to the tables and then you would need a trigger to update those columns. However, you could just as easily select the price * qty to get the cost, without creating an additional column or trigger. I have no idea what you might want to do with a global temporary table. I think you need to explain what your purpose is, before any of us can suggest the best method. Since I have already demonstrated an update with a view, I will demonstrate an update with the cost column added to the odetails table and a trigger as you asked about. Notice that you will need triggers on both tables, the one that has qty and the one that has price.
    scott@ORA92> create table parts
      2    (pno    number(5) not null primary key,
      3       pname  varchar2(30),
      4       qoh    integer check(qoh >= 0),
      5       price  number(6,2) check(price >= 0.0),
      6       olevel integer)
      7  /
    Table created.
    scott@ORA92> create table odetails
      2    (ono    number(5),
      3       pno    number(5) references parts,
      4       qty    integer check(qty > 0),
      5       cost   number,
      6       primary key (ono,pno))
      7  /
    Table created.
    scott@ORA92> create or replace procedure change_price
      2    (ppno   in parts.pno%type,
      3       pprice in parts.price%type)
      4  as
      5  begin
      6    update parts
      7    set    price = pprice
      8    where  pno = ppno;
      9  end;
    10  /
    Procedure created.
    scott@ORA92> create or replace trigger update_cost1
      2    after insert or update of price on parts
      3    for each row
      4  begin
      5    update odetails
      6    set    cost = qty * :new.price
      7    where  pno = :new.pno;
      8  end update_cost1;
      9  /
    Trigger created.
    scott@ORA92> show errors
    No errors.
    scott@ORA92> create or replace trigger update_cost2
      2    before insert or update of qty on odetails
      3    for each row
      4  declare
      5    v_price parts.price%type;
      6  begin
      7    select price
      8    into   v_price
      9    from   parts
    10    where  pno = :new.pno;
    11    --
    12    :new.cost := :new.qty * v_price;
    13  end update_cost2;
    14  /
    Trigger created.
    scott@ORA92> show errors
    No errors.
    scott@ORA92> insert into parts values (1, 'name1', 1, 10, 1)
      2  /
    1 row created.
    scott@ORA92> insert into odetails values (1, 1, 22, null)
      2  /
    1 row created.
    scott@ORA92> -- starting data:
    scott@ORA92> select * from parts
      2  /
           PNO PNAME                                 QOH      PRICE     OLEVEL
             1 name1                                   1         10          1
    scott@ORA92> select * from odetails
      2  /
           ONO        PNO        QTY       COST
             1          1         22        220
    scott@ORA92> -- update:
    scott@ORA92> execute change_price (1, 11)
    PL/SQL procedure successfully completed.
    scott@ORA92> -- results:
    scott@ORA92> select * from parts
      2  /
           PNO PNAME                                 QOH      PRICE     OLEVEL
             1 name1                                   1         11          1
    scott@ORA92> select * from odetails
      2  /
           ONO        PNO        QTY       COST
             1          1         22        242
    scott@ORA92> -- select works without extra cost column or trigger:
    scott@ORA92> select o.ono, o.pno, o.qty, (o.qty * p.price) as cost
      2  from   odetails o, parts p
      3  where  o.pno = p.pno
      4  /
           ONO        PNO        QTY       COST
             1          1         22        242
    scott@ORA92>

  • Column in standard table disabled

    Hi ,
    I am working on standard webdynpro components. Now my issue is with newly added field to an standard table in layout of standard SRM Webdynpro component that is /SAPSRM/WDC_UI_SC_DOTC_BD.In this component I added VNAME  field as an input field and added it as an  column 2 and maintained all the properties as required in metadata thru spro .But now the issue is whenever I get the table the column is showing as an read only ..but once if i am entering all the details in an row and trigger enter  button then I am getting this input field as non - read only .But by default I want to make it as an non read only .I checked with all the properties in SPRO and Properties of the column .All are enabled but I am getting as disabled .So pls help me in this to solve the issue ..
    Thanks ,
    Sandeep

    Hi Sandeep,
    Only newly added column is coming as read only or compelte table? what about other columns(fields).
    Try by creating one more attribute of type WDY_BOOLEAN say ENABLE and bind this to your added field enable property.
    and in WDDOINT of pre or post exit set this attribute to ABAP_TRUE. it might works..
    Cheers,
    Kris.

  • Wich is correct way to handle Workflow of documents ?

    We are starting a project to handle Workflow of documents.
    We have an Enterprise with some Users that edit and publish documents;
    and related subcompanies that have Users that read only the documents.
    We have to handle the revisions of documents, the process phases and the validation
    of a revisor for each phase and also control the document access.
    Our backend database is Oracle 8 for Wordgroup (in the Enterprise) and IIS for the client access (from subcompanies).
    We want to use this architecture : client (HTML) and server (servlet, JSP).
    These documents are written with Word97 and are stored in Oracle 8.
    We plan in the future on updating Oracle 8 FWG > Oracle8 Enterprise > Oracle8i and the migration from IIS (NT Web Server) to (UNIX Solaris).
    My questions are:
    1) How control the open and save of documents with Oracle connection ?
    2) Is better to store the documents inside Oracle or just insert the URL in tables ?
    3) If I want to use ConText cartridge for searching mechanism where I have to store
    this documents ?
    4) For the servlets I need an Application Server ? Wich release ?
    Could you help me to get the correct solution. I would appreciate any suggestions.
    Thanks
    Lorenzo Baldovini.
    [email protected]

    Hi,
    You really need to take a look at the XMLDB Developers guide.
    For updating XML with SQL/XML see UPDATEXML and for XQuery see [Using XQuery with Oracle XMLDB|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb_xquery.htm#sthref1673]
    HTH,
    Chris

  • Correct way of async updates?

    Hi FX gurus
    As far as I understand, no other thread than the JFX app thread may manipulate node props in the scene graph.
    If I have the need to reflect async updates of a data model within my JavaFX UI, the way to go is via Platform.runLater in a JFX task or service. Correct?
    The problem is, if updates become to frequent (a few ms, dep on platform), the JavaFX app becomes completely unresponsive.
    Is there another possibility or preferred way to achieve frequent updates? Or do I have to throttle update rates?
    I am using Jfx 2.2 b11 under Win7 64
    My app setup is a scene with some textfields, their text properties bound to SimpleStringProperty objects.
    An JFX Task with adjustable rate (Thread.sleep) frequently updates the property objects.
    Another task frequently (twice a second) measures the framerate.
    Can provide code, if wanted.....
    regards,
    Bernhard
    Edited by: user9218224 on Jun 13, 2012 1:24 AM

    If I have the need to reflect async updates of a data model within my JavaFX UI, the way to go is via Platform.runLater in a JFX task or service. Correct?Sounds like the PartialResultsTask case in the task javadoc
    http://docs.oracle.com/javafx/2/api/javafx/concurrent/Task.html
    Though, often you don't need to have a Task and can just use runlater (e.g. if your async communication framework may has it's own threading implementation and you just want to communicate the results from the communication thread back on to the JavaFX application thread).
    Tasks are nice if you need to do things like measure progress and provide update messages and require hooks for task state changes.
    do I have to throttle update rates?You can have your async communication receiver accept a bunch of results and batch them up before passing them over to the JavaFX application thread - that way you don't flood the application thread.
    You could take a look at Richard's sample code here for some pointers on how that might be achieved:
    Re: GUi pause even with Platform.runLater "GUi pause even with Platform.runLater"
    These kind of issues have come up a few time in the past, perhaps something can be done in the underlying platform to make things easier for application developers, but I'm not sure what.

  • Clients connect to wifi with certificate that expires every month - correct way to handle expired certificates?

    Hi all
    I'm sorry if this is the wrong forum to ask this question. Also my knowledge in this area is somewhat limited, which I why I need your help :-)
    We use wireless networks primarily in my company for all our clients and use a certificate to authenticate to the network. This certificate expires after 1 month and we automatically renew them 1 week before expiry. Relatively often we have users that
    are not connected to the network for a few weeks or more and then the certificate expires before being renewed. Then we have to connect them to the wired network to get the certificate updated, so they can connect to the wireless network again.
    What is the correct approach to solve this issue? We feel extending the life of the certificate would be a too big security compromise. Is there some way you could automatically allow an expired certificate briefly with the sole purpose of renewing the certificate?
    Or how would you normally resolve this issue?
    Thanks for any help/knowledge you can provide :-)

    > Setting the validity period that high, means that the certificate could be cracked before expiry.
    then you should be scary of CAs which validity is 10 or more years. And they use the same cryptography as end-entity certificates (key length and signature algorithms). It is a paranoya. Just make sure if client certificates use at least 2048 bit long
    keys and use SHA1 (or better) signature algorithm. In this case there is a little chance that certificate will be successfully cracked in 2 years.
    If there is an evidence (or indications) of client private key compromise -- immediately revoke the certificate and publish new CRL ASAP. You cannot protect clients from key compromise by using short-living certificates, because key compromise is ususally
    achieved by gaining a control over the private key (malware on client computer). Therefore, there is nothing wrong in issuing client certificates with 1 or 2 year validity.
    My weblog: en-us.sysadmins.lv
    PowerShell PKI Module: pspki.codeplex.com
    PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
    Check out new: SSL Certificate Verifier
    Check out new:
    PowerShell FCIV tool.

Maybe you are looking for

  • X220 won't start up on battery power after BIOS update 1.24/1.25

    This is a really strange issue. I had been using my laptop with the oriiginal 1.10 (or whatever the very first one was) BIOS until yesterday with no problems. I head that there were some important fixes in the newer BIOS versions so I updated to 1.25

  • Diff between odi 10g and 11g

    Hi, Can some one reply the important and main differences between ODI 10 and 11g.Urgent!!! Thanks, Pop...

  • Regd: Oracle Enterprise Data Quality 11g Installation

    Hi All, I am trying to install Oracle Enterprise Data Quality 11g (11.1.1.7.4 ) on Oracle Linux 6.5. Weblogic server installation done successfully but when i tried to invoke Installer for EDQ it it giving message "INST-07248:specified Middleware hom

  • Are display templates available in the TP2?

    Hello! Are display templates available for content/content types? If so, are they set in the CM admin on a type or content? Thanks!

  • Text to speech conversion

    i am workign with oracle /dev and i want my text in field to be converted into speech. can i do this? i ev developed a queue managemnt systema nd i want teh token number and counter be spoken by the system when appear on teh screen. is it possible? p