Extract element value from a trigger

Hi,
I would like to create an 'before/after insert' trigger on a XMLType table that
would extract a value of an element of the inserted XML.
However, I created the following trigger but failed with error :
SQL> create or replace trigger trig_po
2 after insert on purchaseorder
3 for each row
4 declare
5 v_ref varchar2(30);
6
7 begin
8 v_ref := :NEW.extractvalue('/PurchaseOrder/Reference');
9
Warning: Trigger created with compilation errors.
SQL> show error
Errors for TRIGGER TRIG_PO:
LINE/COL ERROR
5/12 PLS-00049: bad bind variable 'NEW.EXTRACTVALUE'
SQL>
The XMLType table is created as follow :
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://localhost:8080/swd/XSD/purchaseOrder.xsd',
SCHEMADOC => xdbURIType('/swd/XSD/purchaseOrder.xsd').getClob(),
LOCAL => FALSE,
GENTYPES => TRUE,
GENTABLES => TRUE);
END;
And, the following SQL can successfully insert a XML into this XMLType table
without any trigger implemented.
insert into purchaseorder values (xmltype(
'<?xml version="1.0" encoding="US-ASCII"?>
<PurchaseOrder xsi:noNamespaceSchemaLocation="http://localhost:8080/swd/XSD/purchaseOrder.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<Reference>ADAMS-20011127121052815PST</Reference>
<Actions>
<Action>
<User>SCOTT</User>
</Action>
</Actions>
<Reject/>
<Requestor>Julie P. Adams</Requestor>
<User>ADAMS</User>
<CostCenter>R20</CostCenter>
<ShippingInstructions>
<name>Julie P. Adams</name>
<address>300 Oracle Parkway
Redwood Shores
CA
94065
USA</address>
<telephone>650 506 7300</telephone>
</ShippingInstructions>
<SpecialInstructions>Ground</SpecialInstructions>
</PurchaseOrder>'))
Thanks in advanced.

ExtractValue is a SQL Function not a method
You'll need something along the lines of
select extractValue(:new.sys_nc_rowinfo$,'/PurchaseOrder/Reference')
  into v_ref
  from dual;

Similar Messages

  • Passing Values from a Trigger to a procedure

    Hi,
    How do i pass my OLD and NEW values from a Trigger to a Procedure. THe procedure will contain statements which will insert one record for each column with the OLD and NEW value.( I may have 31 inserts in the LOG table)
    Basically we have a table with 31 fields, i am tracking the changes done on that table, in my trigger i compare IF :OLD.COL1 <> :NEW.COL1 then i am inserting in a LOG Table if the values have changed.
    I am also tracking ie inserting in the LOG table if i am ADDING OR DELETING any row from the tabble.
    Thank yu

    It worked i created a RECORD type variable and passed OLD Value to one variable and NEW value to another variable.
    thanks

  • Using WQL "one-liner" to extract a value from the registry

    Can I extract a value from the registry using a "one-liner" WQL command?  Something like the following:
    Under root\default:StdRegProv
                   SELECT <Data> FROM "HKLM:SOFTWARE\Toto\Version"
    Please note that I am aware of how this is done via script.  The problem is that I'm using a management system (SCOM), which only allows me to supply a simple WQL query to perform my evaluation.
    Thanks,
    Larry

    Hi Larry,
    There have a specific forum to support the scripting related question, i sugges you ask in Scripting forum there will have more
    professional engineer will help you.
    The Official Scripting Guys Forum!
    https://social.technet.microsoft.com/Forums/en-US/9d5a7990-b975-488a-b7c0-6d866f29cf0a/change-mouse-scheme?forum=ITCG
    Best Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to extract an element value from a String of HTML

    I have a web service that returns a fragment of HTML that contains a number in a table. The return parameter type is a string. I need to get this number and use it in a BPEL while loop, as the condition for the loop (while the number > 0).
    I have tried using the function bpws:getVariableData() but the BPEL PM faults and says: XPath expression failed to execute. Error while processing xpath expression. I think this is because I am trying to apply an XPath expression over a String variable.
    The return value from my web service looks like this:
    <whileConditionResultSet>
    <part xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" name="response">
    <ns1:string_Response xmlns:ns1="http://systinet.com/xsd/SchemaTypes/"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="d:string">
         <p>SQL Query: select count(*) from delta_manages</p>
         <p><table border='1'>
              <tr> <th bgcolor='#C0C0C0'>COUNT(*)</th></tr>
              <tr> <td>28</td></tr>
              </table>
         </p></ns1:string_Response>
    </part>
    </whileConditionResultSet>
    How do I get the value from the HTML table into a BPEL variable?

    the doSqlService() which executes an arbitrary SQL statement, returns a string of HTML like this:
    <doSqlServiceResponse>
    <part xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" name="response">
    <ns1:string_Response xmlns:ns1="http://systinet.com/xsd/SchemaTypes/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="d:string"><p>SQL Query: select count(*) from delta_manages</p> <p><table border='1'> <tr> <th bgcolor='#C0C0C0'>COUNT(*)</th></tr> <tr> <td>14</td></tr> </table></p></ns1:string_Response>
    </part>
    I then copy the result to the whileResultString variable
    <variable name="whileResultString" type="xsd:string"/>
    <copy>
                                       <from variable="doSqlServiceResponse" part="response" query="/ns1:string_Response">
                                       </from>
                                       <to variable="whileResultString"/>
                                  </copy>
    I realise too, a root element will be needed. This is not a mission critical problem as we could change the web service at the other end. It was originally designed for a client to display the results rather than use them within a business process. Anyway, I'm just interested to know if I can create a node from this string data in BPEL.
    Ross.

  • Extracting all values from multiple menus

    Hello all,
    Basically I have a jsp that consists of three of what FrontPage calls drop down boxes but I will hereafter call list boxes, each containing a number of options extracted from a database; these values can be moved from one box to another using java script. When I hit a submit button I wish to be able to extract all the values from two of these lists and add them into a database. I know how to extract selected values but I need all the values of both lists regardless of what the user selects and I need the contents of each kept distinct.
    Any help provided will be appreciated and I apologize if this question is something all the forum vets have already seen before.
    Philip

    Only the values that are selected will be submitted
    with the form. So, add a call to your form tag's
    onSubmit event to call a function like this:<form name='myForm' onsubmit='selectAll()'>
    <script language='javascript'>
    function selectAll() {
    for(i=0; i<myForm.mySelectList.options.length; i++)
    myForm.mySelectList.options.selected = true;
    // do the same for the other two select lists
    </script>
    Thanks for the tip, but unfortunately this means that the two list boxes that I want will become intermingled. Is there a way to keep the information in the two lists seperate?
    Philip                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to extract the values from WPBP table

    Hi experts,
    We are in preparation of a custom report.
    In the report we want to have a  value from WPBP table.
    We want to extract the value of Capacity utilization level from WPBP table.
    Could you please let me know the way to extract the value.
    Please advice.
    Regards,
    Sairam.

    Hi Sairam,
    Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
    So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
    Regards;
    Okan

  • NullPointerException was thrown while extracting a value from an instance

    Dear all,
    We have got a null point exception during commit call. According to the stack trace shown below, it seems that it is a problem due to instance variable accessor. As we know toplink use reflection to access the instance variable value. I am curious whether the exception we got is related to any class-loader setting. Thanks a lot.
    =================
    Stack Trace:
    Exception [TOPLINK-69] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle
    .toplink.exceptions.DescriptorException
    Exception Description: A NullPointerException was thrown while extracting a valu
    e from the instance variable [versionID] in the object [com.oocl.csc.frm.pom.tes
    t.model.Company].
    Internal Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[versionID-->COMPANY.VERSIO
    NID]
    Descriptor: Descriptor(com.oocl.csc.frm.pom.test.model.Company --> [DatabaseTabl
    e(COMPANY)])
    at oracle.toplink.exceptions.DescriptorException.nullPointerWhileGetting
    ValueThruInstanceVariableAccessor(DescriptorException.java:1022)
    at oracle.toplink.internal.descriptors.InstanceVariableAttributeAccessor
    .getAttributeValueFromObject(InstanceVariableAttributeAccessor.java:68)
    at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(D
    atabaseMapping.java:304)
    at oracle.toplink.mappings.DirectToFieldMapping.iterate(DirectToFieldMap
    ping.java:355)
    at oracle.toplink.internal.descriptors.ObjectBuilder.iterate(ObjectBuild
    er.java:1438)
    at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferen
    ceObjects(DescriptorIterator.java:258)
    at oracle.toplink.internal.descriptors.DescriptorIterator.startIteration
    On(DescriptorIterator.java:407)
    at oracle.toplink.publicinterface.UnitOfWork.discoverUnregisteredNewObje
    cts(UnitOfWork.java:1368)
    at oracle.toplink.publicinterface.UnitOfWork.discoverAllUnregisteredNewO
    bjects(UnitOfWork.java:1290)
    at oracle.toplink.publicinterface.UnitOfWork.assignSequenceNumbers(UnitO
    fWork.java:326)
    at oracle.toplink.publicinterface.UnitOfWork.collectAndPrepareObjectsFor
    Commit(UnitOfWork.java:664)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeS
    et(UnitOfWork.java:1130)
    at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOf
    Work.java:956)
    at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:771)
    ====================
    ====================
    Mapping Description:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <project>
    <project-name>POM-TEST</project-name>
    <login>
    <database-login>
    <platform>oracle.toplink.oraclespecific.Oracle9Platform</platform>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@sjcngdb2:1521:cdrfrmdv</connection-ur
    l>
    <user-name>pomowner</user-name>
    <password>BB742416276274A47F360CCDD2711570</password>
    <uses-native-sequencing>false</uses-native-sequencing>
    <sequence-preallocation-size>50</sequence-preallocation-size>
    <sequence-table>SEQUENCE</sequence-table>
    <sequence-name-field>SEQ_NAME</sequence-name-field>
    <sequence-counter-field>SEQ_COUNT</sequence-counter-field>
    <should-bind-all-parameters>false</should-bind-all-parameters>
    <should-cache-all-statements>false</should-cache-all-statements>
    <uses-byte-array-binding>true</uses-byte-array-binding>
    <uses-string-binding>false</uses-string-binding>
    <uses-streams-for-binding>false</uses-streams-for-binding>
    <should-force-field-names-to-upper-case>false</should-force-field-names
    -to-upper-case>
    <should-optimize-data-conversion>true</should-optimize-data-conversion>
    <should-trim-strings>true</should-trim-strings>
    <uses-batch-writing>false</uses-batch-writing>
    <uses-jdbc-batch-writing>true</uses-jdbc-batch-writing>
    <uses-external-connection-pooling>false</uses-external-connection-pooli
    ng>
    <uses-external-transaction-controller>false</uses-external-transaction-
    controller>
    <type>oracle.toplink.sessions.DatabaseLogin</type>
    </database-login>
    </login>
    <java-class>com.oocl.csc.frm.pom.test.model.Company</java-class>
    <tables>
    <table>COMPANY</table>
    </tables>
    <primary-key-fields>
    <field>COMPANY.COMPANY_KEY</field>
    </primary-key-fields>
    <descriptor-type-value>Normal</descriptor-type-value>
    <identity-map-class>oracle.toplink.internal.identitymaps.SoftCacheWeakI
    dentityMap</identity-map-class>
    <remote-identity-map-class>oracle.toplink.internal.identitymaps.SoftCac
    heWeakIdentityMap</remote-identity-map-class>
    <identity-map-size>100</identity-map-size>
    <remote-identity-map-size>100</remote-identity-map-size>
    <should-always-refresh-cache>false</should-always-refresh-cache>
    <should-always-refresh-cache-on-remote>false</should-always-refresh-cac
    he-on-remote>
    <should-only-refresh-cache-if-newer-version>false</should-only-refresh-
    cache-if-newer-version>
    <should-disable-cache-hits>false</should-disable-cache-hits>
    <should-disable-cache-hits-on-remote>false</should-disable-cache-hits-o
    n-remote>
    <alias>Company</alias>
    <copy-policy>
    <descriptor-copy-policy>
    <type>oracle.toplink.internal.descriptors.CopyPolicy</type>
    </descriptor-copy-policy>
    </copy-policy>
    <instantiation-policy>
    <descriptor-instantiation-policy>
    <type>oracle.toplink.internal.descriptors.InstantiationPolicy</ty
    pe>
    </descriptor-instantiation-policy>
    </instantiation-policy>
    <query-manager>
    <descriptor-query-manager>
    <existence-check>Check cache</existence-check>
    </descriptor-query-manager>
    </query-manager>
    <event-manager>
    <descriptor-event-manager empty-aggregate="true"/>
    </event-manager>
    <mappings>
    <database-mapping>
    <attribute-name>companyKey</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.COMPANY_KEY</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>contact</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.test.model.Contact</referen
    ce-class>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.NoIndirectionPoli
    cy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <uses-joining>false</uses-joining>
    <foreign-key-fields>
    <field>COMPANY.CONTACT_OID</field>
    </foreign-key-fields>
    <source-to-target-key-field-associations>
    <association>
    <association-key>COMPANY.CONTACT_OID</association-key>
    <association-value>CONTACT.POID</association-value>
    </association>
    </source-to-target-key-field-associations>
    <type>oracle.toplink.mappings.OneToOneMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>createdBy</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.CREATED_BY</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>creationClientID</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.CREATION_CLIENTID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>creationTime</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.CREATION_TIME</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>employeeList</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.test.model.Person</referenc
    e-class>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.NoIndirectionPoli
    cy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <container-policy>
    <mapping-container-policy>
    <container-class>com.oocl.csc.frm.pom.impl.FWPersistentArra
    yList</container-class>
    <type>oracle.toplink.internal.queryframework.ListContainerP
    olicy</type>
    </mapping-container-policy>
    </container-policy>
    <relation-table>EMPLOYEMENT</relation-table>
    <source-key-fields>
    <field>COMPANY.COMPANY_KEY</field>
    </source-key-fields>
    <source-relation-key-fields>
    <field>EMPLOYEMENT.EMPLOYER_KEY</field>
    </source-relation-key-fields>
    <target-key-fields>
    <field>PERSON.POID</field>
    </target-key-fields>
    <target-relation-key-fields>
    <field>EMPLOYEMENT.EMPLOYEE_ID</field>
    </target-relation-key-fields>
    <type>oracle.toplink.mappings.ManyToManyMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>lastUpdateClientID</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.LAST_UPDATE_CLIENTID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>lastUpdatedBy</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.LAST_UPDATED_BY</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>lastUpdateTime</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.LAST_UPDATE_TIME</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>name</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.NAME</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>partner</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.test.model.Company</referen
    ce-class>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.NoIndirectionPoli
    cy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <uses-joining>false</uses-joining>
    <foreign-key-fields>
    <field>COMPANY.PARTNER</field>
    </foreign-key-fields>
    <source-to-target-key-field-associations>
    <association>
    <association-key>COMPANY.PARTNER</association-key>
    <association-value>COMPANY.COMPANY_KEY</association-value>
    </association>
    </source-to-target-key-field-associations>
    <type>oracle.toplink.mappings.OneToOneMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>persistentCtxt</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.impl.FWPOMPersistentContext
    </reference-class>
    <is-null-allowed>false</is-null-allowed>
    <aggregate-to-source-field-name-associations>
    <association>
    <association-key>OWNERID</association-key>
    <association-value>COMPANY.OWNERID</association-value>
    </association>
    <association>
    <association-key>ROOTID</association-key>
    <association-value>COMPANY.ROOTID</association-value>
    </association>
    </aggregate-to-source-field-name-associations>
    <type>oracle.toplink.mappings.AggregateObjectMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>poid</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.POID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>version</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.VERSION</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>versionID</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.VERSIONID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    </mappings>
    <type>oracle.toplink.publicinterface.Descriptor</type>
    </descriptor>
    </descriptors>
    </project>
    ====================
    ====================
    Session Creation Method:
    SessionBroker broker = (SessionBroker) manager.getSession(brokerName, Thread.currentThread().getContextClassLoader());
    broker.getLogin().getPlatform().getConversionManager().setLoader(Thread.currentThread().getContextClassLoader());
    ====================
    ===================
    Class Hierarchy:
    Object extends> ..xxx.. extends> FWObject extends> Company
    The problematic attribute -- versionID -- is defined at "FWObject" level.
    ===================
    ===================
    Environment Configuration:
    Application Server version: 10.1.2
    TopLink version : 9.0.4.5
    TopLink classpath: specified at container level
    FWObject classpath: specified at container level
    Company classpath: specified at application level
    ===================
    Thanks and regards,
    William

    Dear All,
    We have loaded the toplink.jar to container level instead of application level. Don't know whether it is a possible source of error. Moreover, what is the purpose of loading antlr.jar? What is this jar for?
    Thanks and regards,
    William

  • Extracting a value from the j_security_check servlet into a JSP page

    Hi Folks...
    I have a problem as follows:
    I log in into the web app, via my login.jsp page. Below is the code for the form that accepts the login information
    <form method="POST" action="j_security_check">  
    <table cellpadding="0" cellspacing="0" border="0">  
      <tr>  
        <td align="right">Username: </td>  
        <td><input type="text" name="j_username"></td>  
      </tr>  
      <tr>  
        <td align="right">Password: </td>  
        <td><input type="password" name="j_password"></td>  
      </tr>  
      <tr>  
        <td></td>  
        <td><input type="submit" value="Login"></td>  
      </tr>  
    </table>  
    </form>Login is sucessful and I am brought to the 'studentstub.jsp' page. I would like the user name to appear on the 'studentstub.jsp' page. I used the following code in the 'studentstub.jsp' page :
    <td><%= request.getParameter("j_username")%></td>  but all I am getting is a null. The 'j_security_check' servlet is not exactly part of my package, but the glassfish app server. Is there anything wrong in the way I am extracting the information from 'j_security_check' ? Hope someone can advise, thanks.

    Hi Folks..
    I managed to get a reply from another forum and the suggested solution works. I am going to share it with everyone here.
    I repalced this line of code:
    <td><%= request.getParameter("j_username")%></td>with this:
    <td><%= request.getRemoteUser()%></td>The 'getRemoteUser' method from HttpServletRequest returns the name of the authenticated user. I hope this information will be helpful to those caught in a simillar problem. Thanks.

  • How extract a value from table?

    how extract a value only from table with labview 5.0?

    Hi T4l
    I modified you VI to extract a selected row from the table. This is quite simple by done by using the index array function. Hope this helps
    B Bakels
    Labview CLD , Engineer/Manager
    Promedes and DSM
    using LV 7.1, 8.0, 8.2, 8.5 and 2009 SP1
    http://www.promedes.nl
    Attachments:
    Untitled 2.vi ‏16 KB

  • Extract y value from graph at any given time

    I have a graph with a pre-plotted curve generated from a standard set of results. I need to extract the y value of the curve at any given point. My y value is pressure and my x value is stroke(hydraulic cylinder movement in mm). So for example at 10mm(x value) I need to extract the pressure(y value). Is there a property node I could use for this? any help would be much appreciated.

    Hi Alan,
    instead of reading values from the graph you may use the interpolation functions from the array palette to do interpolation on the plotted values directly...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to extract attribute value from an XML

    I have column where all my diffrent structures of XML's are getting stored. I want extract a patticular attribute value from all the XML’s. Can any one help me with this?
    Thanks,
    swagath

    Kindly refer to the EXTRACTVALUE function in your online documentation and refrain from further doc questions.
    Sybrand Bakker
    Senior Oracle DBA

  • To extract null Values from the source in Infopackage selections - Very Urg

    Hi All,
    I need to pull the data which has null values from source. I tried to write routine by giving l_t_range-low = '' , space. nothing is working.
    Please guide me with sample code.
    Very Urgent.
    Regards
    Mano

    Hi Mario.
    Assuming that you want to avoid uploading of records having
    zero for a keyfigure:
    Create a startroutine for transfer rules and add this coding:
    DELETE DATAPAK WHERE VALUE = '0'.
    OR
    LOOP AT DATAPAK.
    IF DATAPAK-VALUE = 0..
    DELETE DATAPAK.
    ENDIF.
    ENDLOOP.
    'VALUE' represents the fieldname in transferstructure
    Please let me know if i misundersttod the issue.
    Regards
    Joe

  • Extracting unique values from (non-category) columns for chart

    Hello:
    I've created a worksheet to keep inventory of my Intellivision games.  It has the following columns:
    Publisher
    Class
    Network
    Title
    Quantity
    (misc...)
    The "Class" represents whether the game is "complete in box" or "loose cartridge."  The "Network" represents the general genre or game cateogory.  The quantity is how much I have of each.
    I have set the first three columns as categories:  Publisher, Class, and Network.  I also created a bar chart based on the Title and Quantity columns, to show how many I have of each.
    The problem I have is that, although it looks real cool and helps me keep the games organized, since a title can appear in more than one "Class" (e.g., I can have one in box, and two loose), the chart includes duplicates, and they are not grouped together.
    Is there a way that I can create a graph (or a secondary table) that exctracts only the UNIQUE values from a column that may contain duplicates?
    Note that I don't want to put the "Title" column in a category.  I want to group by the three major categories and list the games on each.
         -dZ.

    From the Numbers Help Menu, download the Numbers User Guide. Read the first three or four chapters to get a feel for the app. It's well written and won't take long to read that much.
    Then use the Table of Contents and the Search tool to get additional specific directions.
    First, delete all unneeded Rows and Columns from your data table. If you have patches of data in a larger table, Cut the patches and Paste them to a blank Sheet area to create separate dedicated tables for your various needs. These small special purpose tables are like Named Ranges in Excel. Name them in the Sheets Pane.
    This is how Numbers was intended to be used. The User Guide will describe how to reference cells in one table from expressions in another table. If you use the point and click method of creating references from within the equation editor it won't matter a bit that the tables are separate.
    Come back here for specific help on anything you are having trouble with.
    Jerry

  • Extracting elements collection from XMLType

    Hi,
    I found in online documentation that extract() method of XMLType can retrieve a collection expression which can be used in the FROM clause of SQL statements,
    bud did't find any example that illustrates this option.
    <PO>
    <PONO>100</PONO>
    <PONO>200</PONO>
    </PO>
    All I need is to extract all <PONIO> elements as a collection or as a tabular data representation.
    Is there some simple way to do so?
    Thanks

    If you consider the following XML document:
    <PurchaseOrder
    <LineItems>
    <LineItem ItemNumber="1">
    <Description>The Ruling Class</Description>
    <Part Id="715515012423" UnitPrice="39.95" Quantity="2"/>
    </LineItem>
    <LineItem ItemNumber="2">
    <Description>Diabolique</Description>
    <Part Id="037429135020" UnitPrice="29.95" Quantity="3"/>
    </LineItem>
    <LineItem ItemNumber="3">
    <Description>8 1/2</Description>
    <Part Id="037429135624" UnitPrice="39.95" Quantity="4"/>
    </LineItem>
    </LineItems>
    </PurchaseOrder>
    ...then you can apply this query:
    SELECT extractValue(value(t),'/Description')
    FROM XMLTABLE X,
    TABLE ( xmlsequence (
    extract(value(X),
    '/PurchaseOrder/LineItems/LineItem/Description')
    ) t;
    This returns:
    EXTRACTVALUE(VALUE(T),'/DESCRIPTION')
    The Ruling Class
    Diabolique
    8 1/2
    You can find more here:
    http://www.csis.gvsu.edu/GeneralInfo/Oracle/appdev.920/a96620/xdb03usg.htm#1036854

  • Getting all of the NEW values from a trigger to store as XML CLOB

    Our custom system has a number of tables which are given to us from a centralized reference data system. When data is incorrect or missing, the users have the ability to enter in a change request to the data.
    We are looking at storing these changes as XML in CLOB colums to make the storage of the requests more generic. I was given this to work with:
    SELECT value(em).getClobVal() AS "XMLTYPE"
    FROM table(XMLSequence(Cursor(SELECT *
    FROM TABLE_A
    WHERE X=WHATEVER))) em;
    Now that will give me an XML row for each return row. The problem is, I'm placing this in an AFTER INSERT TRIGGER so I cannot SELECT from the table, I can only use the values as passed in the REFERENCING section.
    My problem is, I'd like to make this as generic as possible so I don't have to lay out the columns individually for each table we institute this on (there's about 70 of them).
    I'm not sure if I'm explaining this well enough. This is on 10gR2. What I'm ultimately looking for is a generic way to take a row that was just inserted into a table, wrap it in XML tags corresponding to the column name and then insert that info into a CLOB in another table.

    hi vittorio
    i have a solution but im very sure it is not exact answer to your question . it will definitely help you .
    create table temp_type as select * from emp where 1 = 2;
    create or replace procedure emp_ins(emp_row emp%rowtype) as
    pragma autonomous_transaction;
    begin
    insert into temp_type(empno,ename) values(emp_row.empno,emp_row.ename);
    commit;
    end;
    create or replace trigger emp_ins_trig before insert on emp for each row
    declare
    /*  empr emp_types.emprowtype%type;*/
    empr emp%rowtype;
    begin
      empr.empno := :new.empno;
      empr.ename := :new.ename;
    emp_ins(empr);
    end;
    /unfortunately , in oracle we dont have a facility to access the members of a record or recordset by their position
    Such facility is very much there in Visual Basic , similar programming tools.
    we can access the members of a recordset by the index position ( here index means the position of the field)

Maybe you are looking for