Newbie trying to query an XML field in Clob

I've been unsuccessfully trying to query XML data in a CLOB field today without much success.
The clob field stores approvals (Edited, Reviewed, Published) for each version.
I'm trying to get the latest version (in this case 13) and what state (name) it is at (in this case 'Reviewed')
Below is an example of the table and field with a single XML column...
desc WIKI.OS_PROPERTYENTRY
Name                                              Null?       Type
ENTITY_NAME                                         NOT NULL VARCHAR2(125)
ENTITY_ID                                         NOT NULL NUMBER(19)
ENTITY_KEY                                         NOT NULL VARCHAR2(200)
KEY_TYPE                                               NUMBER(10)
BOOLEAN_VAL                                               NUMBER(1)
DOUBLE_VAL                                               FLOAT(126)
STRING_VAL                                               VARCHAR2(255)
TEXT_VAL                                               CLOB
LONG_VAL                                               NUMBER(19)
INT_VAL                                               NUMBER(10)
DATE_VAL                                               DATE
SQL> select xmltype(text_val) from wiki.os_propertyentry where entity_id = 7274716 and entity_key = 'com.comalatech.workflow.approvals';
XMLTYPE(TEXT_VAL)
<ApprovalChecks>
  <ApprovalCheck>
    <name>Edited</name>
    <version>7</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2008-10-31 13:47:25.638 NZDT</date>
     <comment>Initial import from Word document without change</comment>
      </Approver>
    </approvers>
    <weight>10</weight>
    <id>1</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Reviewed</name>
    <version>7</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2008-10-31 13:47:30.532 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>20</weight>
    <id>2</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Signoff</name>
    <version>7</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2008-10-31 13:47:32.532 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>30</weight>
    <id>3</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Edited</name>
    <version>8</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2008-11-02 10:54:07.903 NZDT</date>
     <comment>Updated references re Wiki, removed unwanted sections</comment>
      </Approver>
    </approvers>
    <weight>10</weight>
    <id>4</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Reviewed</name>
    <version>8</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2008-11-02 10:54:10.552 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>20</weight>
    <id>5</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Signoff</name>
    <version>8</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2008-11-02 10:54:13.161 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>30</weight>
    <id>6</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Edited</name>
    <version>9</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2009-11-13 08:53:00.649 NZDT</date>
     <comment>Testing approval information</comment>
      </Approver>
    </approvers>
    <weight>10</weight>
    <id>7</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Edited</name>
    <version>9</version>
    <approvers>
      <Approver>
     <approved>false</approved>
     <user>bgra030</user>
     <date>2009-11-13 08:53:13.830 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>10</weight>
    <id>8</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Edited</name>
    <version>12</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2009-11-23 11:08:14.666 NZDT</date>
     <comment>Changes due to self auditing, using Study Audit Checklist and DM Study Checklist</comment>
      </Approver>
    </approvers>
    <weight>10</weight>
    <id>9</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Reviewed</name>
    <version>12</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2009-11-23 11:08:20.345 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>20</weight>
    <id>10</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Signoff</name>
    <version>12</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2009-11-23 11:08:23.997 NZDT</date>
     <comment/>
      </Approver>
    </approvers>
    <weight>30</weight>
    <id>11</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Edited</name>
    <version>13</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2011-10-31 10:42:37.703 NZDT</date>
     <comment>No change, just change of name of a linked page</comment>
      </Approver>
    </approvers>
    <weight>10</weight>
    <id>12</id>
    <stateId>0</stateId>
    <attachments/>
  </ApprovalCheck>
  <ApprovalCheck>
    <name>Reviewed</name>
    <version>13</version>
    <approvers>
      <Approver>
     <approved>true</approved>
     <user>bgra030</user>
     <date>2011-10-31 10:42:40.596 NZDT</date>
     <comm
1 row selected.My query is way off,... I can't even get it to run, let alone getting the record I want without some hard coding...
Can anyone help?
Thanks in advance.
select y.y_name, y.y_version, z.z_approved, z.z_user, z.z_date, z.z_comment
from WIKI.os_propertyentry t,
     XMLTABLE('$p/ApprovalChecks/ApprovalCheck'
              PASSING t.text_val as "p"
              COLUMNS y_name       VARCHAR2(30) PATH 'ApprovalCheck/name',
                      y_version    NUMBER       PATH 'ApprovalCheck/version',
                      Approver     XMLTYPE      PATH 'ApprovalCheck/approvers/Approver/*') y,
     XMLTABLE('$a/Approver'
              PASSING y.Approver as "a"
              COLUMNS z_approved  VARCHAR2(8)   PATH 'Approver/approved',
                      z_user      VARCHAR2(30)  PATH 'Approver/user',
                      z_date      DATE          PATH 'Approver/date',
                      z_comment   VARCHAR2(100) PATH 'Approver/comment') z
where entity_id = 7274716 and entity_key = 'com.comalatech.workflow.approvals'
and   t.name = 'Reviewed'
and   t.version = 13;
           PASSING t.text_val as "p"
ERROR at line 4:
ORA-00932: inconsistent datatypes: expected - got CLOB

Further to the above, the query returns a single record okay,...
SQL > l  
  1  with all_versions as (
  2    select c.title, y.y_name, y.y_version, z.z_approved, z.z_user, z.z_date z_date, z.z_comment,
  3           row_number() over( order by to_timestamp_tz(z_date, 'YYYY-MM-DD HH24:MI:SS.FF3 TZD') desc ) as rn
  4    from wiki.os_propertyentry t, wiki.content c,
  5         XMLTABLE('$p/ApprovalChecks/ApprovalCheck'
  6               PASSING xmltype(t.text_val) as "p"
  7               COLUMNS y_name       VARCHAR2(30) PATH 'name',
  8                    y_version       NUMBER       PATH 'version',
  9                    Approver       XMLTYPE      PATH 'approvers/Approver/*') y,
10         XMLTABLE('$a'
11               PASSING y.Approver as "a"
12               COLUMNS z_approved  VARCHAR2(8)   PATH '/approved',
13                    z_user      VARCHAR2(30)  PATH '/user',
14                    z_date      VARCHAR2(30)  PATH '/date',
15                    z_comment      VARCHAR2(100) PATH '/comment') z
16    where c.contentid = t.entity_id
17    and   c.spaceid = (select spaceid from wiki.spaces where spacename = 'Quality')
18    and   entity_id = 7274716
19    and entity_key = 'com.comalatech.workflow.approvals'
20    )
21  select title, y_name, y_version
22  from all_versions
23* where rn = 1
SQL> /
TITLE                           Y_NAME                          Y_VERSION
Quality Audits (NIHI-5001)     Signoff                     17
1 row selected.... but I want to now query on all records, not just one.
When I comment out the clause (and entity_id = xxxxx) I now get an error. I should have got ~300 records,.... what do I need to do to make this work?
SQL > 18
18*   and   entity_id = 7274716
SQL> > c /and/-- and
18*   -- and     entity_id = 7274716
SQL > l
  1  with all_versions as (
  2    select t.entity_id, c.title, y.y_name, y.y_version, z.z_approved, z.z_user, z.z_date z_date, z.z_comment,
  3           row_number() over( order by to_timestamp_tz(z_date, 'YYYY-MM-DD HH24:MI:SS.FF3 TZD') desc ) as rn
  4    from wiki.os_propertyentry t, wiki.content c,
  5         XMLTABLE('$p/ApprovalChecks/ApprovalCheck'
  6               PASSING xmltype(t.text_val) as "p"
  7               COLUMNS y_name       VARCHAR2(30) PATH 'name',
  8                    y_version       NUMBER       PATH 'version',
  9                    Approver       XMLTYPE      PATH 'approvers/Approver/*') y,
10         XMLTABLE('$a'
11               PASSING y.Approver as "a"
12               COLUMNS z_approved  VARCHAR2(8)   PATH '/approved',
13                    z_user      VARCHAR2(30)  PATH '/user',
14                    z_date      VARCHAR2(30)  PATH '/date',
15                    z_comment      VARCHAR2(100) PATH '/comment') z
16    where c.contentid = t.entity_id
17    and   c.spaceid = (select spaceid from wiki.spaces where spacename = 'Quality')
18    -- and     entity_id = 7274716
19    and entity_key = 'com.comalatech.workflow.approvals'
20    )
21  select entity_id, title, y_name, y_version
22  from all_versions
23* where rn = 1
wikiprod: OPS$IT_DBA > /
          PASSING xmltype(t.text_val) as "p"
ERROR at line 6:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00241: entity reference is not well formed
Error at line 8
ORA-06512: at "SYS.XMLTYPE", line 272
ORA-06512: at line 1

Similar Messages

  • Help needed- newbie trying to setup xerces XML pasrer

    Hello all,
    I am new to Java and XML.
    I am trying to write a simple java program that will use the xerces parser and will read the XML file.
    I have installed xerces 2.8.0 and put in on a specific location on my hard drive.
    I also added the xercesImpl.jar file to the CLASSPATH variable.
    I am trying to compile this code:
    import org.xml.sax.XMLReader;
    public class SAXParserDemo {
    public void performDemo(String uri) {
    System.out.println("Parsing XML File: " + uri + "\n\n");
    // Instantiate a parser
    XMLReader parser = new SAXParser();
    public static void main(String[] args)
    if (args.length != 1)
    System.out.println("Usage: java SAXParserDemo [XML URI]");
    System.exit(0);
    }//IF
    String uri = args[0];
    SAXParserDemo parserDemo = new SAXParserDemo();
    parserDemo.performDemo(uri);
    }//MAIN
    The error I get is on this line : XMLReader parser = new SAXParser(); stating that it cannot find SAXParser.
    What am I doing wrong? is there something else I need to import?
    Help will be much appreciated.
    Sorry for the newbie question.
    Cheers,
    Mike

    The error I get is on this line : XMLReader parser =
    new SAXParser(); stating that it cannot find
    SAXParser.
    What am I doing wrong? is there something else I need
    to import?Well, yeah. Your code shows you already know how to use the "import" statement. The compiler says it can't find SAXParser, and you correctly suspect that you need to import something. So the logical step: you need to import SAXParser.
    But you don't know what package it's in, right? Well let me just look it up in the API documentation for you... here it is... javax.xml.parsers.SAXParser. Take note of the existence of documentation for the next time you have this sort of question.
    http://java.sun.com/j2se/1.5.0/docs/api/

  • Newbie trying to understand the frame/fields per second concept on video

    Do video camera shutter speeds (1/60sec) reflect an interlaced field or a full frame comprised of two interlaced fields per part of a second.
    I suspect that a shutter setting of 1/60sec means it's not a full frame of video but is just an odd or even lined interlace field. Meaning that if I want to shoot 30fps I need to keep my shutter setting on 1/60sec.
    But if that's really the case, then what am I exactly shooting per second if actual NTSC frame rate is 29.97fps? I mean, the first 2p frames can easily be divided into two fields each, but what about the remaining .97frame. How can you divide that into two fields of interlaced video lines?
    Forgive my ignorance but books have a bad habit of not answering back when you don't understand something they say.
    iMac Intel Duo-Core; Intel Mac mini single-core   Mac OS X (10.4.6)  
    iMac Intel Duo-Core; Intel Mac mini single-core   Mac OS X (10.4.6)  

    The shutter speed is not relevant. I can be either field based or progressive. The frame rate is not dependent on the shutter speed.

  • PeopleSoft Connected Query in XML Publisher Report - Error

    Hello - I'm getting this weird error when trying to run an XML Publisher report off a PeopleSoft Connected Query. The Connected Query runs fine to an XML File. Any ideas? The parent/child queries in the connected query don't use any prompts.
    PCodeWTL(1/3): Prompt Field Name is invalid because it exceeds the maximum allowed size of %1 (50,493)

    We encounter the same problem. Did you get the answer for this issue? Thanks in advance.

  • XSQL not delivering XML fields

    [Win AS2003/Oracle 10.1/OC4J Standalone 9.0.4/XDK 10.1.0.2]
    I am trying to do a query in XSQL that includes one field of XML. However, the XML field always yields the error:
    oracle.xml.sql.OracleXMLSQLException: Conversion to String failed
    This happens with a native XMLTYPE field, or if I use the XMLTYPE() function on a varchar field. The same XSQL files worked just fine under Oracle 9.2, so I'm wondering if my (cumbersome) installation of the XSQL servlet under OC4J is missing a jar somewhere--I followed the directions, but you never know...
    P.S.: Why did Oracle make XSQL so much more difficult to implement in 10g than in 9i? I had to install the Oracle HTTP server separately, which didn't include any java servlet engine, so I had to install OC4J manually (A real pain), then the XDK manually. It all just installed automatically in 9i.

    [been avoiding this issue, but now coming back to it]
    Felipe,
    The anchor in your URL didn't work, but I guess you're pointing to the following quote:
    ==============================================
    Oracle9i introduced the XMLType for use with storing and querying XML-based database content. You can exploit database XML features to produce XML for inclusion in your XSQL pages using one of two techniques:
    * <xsql:query> handles any query including columns of type XMLType, however it handles XML markup in CLOB/VARCHAR2 columns as literal text.
    ==============================================
    Which is a nice thing to say, except that I get the results described above, not what the documentation says I should get.
    Perhaps it is the servlet engine I am using (OC4J), but since it is an oracle engine, it ought to work.
    Brandon

  • Combine query and xml recordset

    I'm trying to see what's the best way to combine a query and
    XML recordset.
    Database:
    TableA
    FieldA, FieldB, ...
    Joe, 1
    Bob, 2
    XML from Web Service
    <record id="1" att="Job A" .../>
    <record id="2" att="Job B" .../>
    Need to link TableA.fieldB to matching id attribute from the
    XML recordset.
    Right now, I load theXML recordset along side the query and
    use XPath to search the XML based on parameters from the query that
    I'm looping and output the results to screen.
    <cfloop ...>
    xmlStr = xmlSearch(xmlRecordset,"/root/record[id =
    #qry.fieldB#]");
    <tr><td>qry.fieldA</td><td>xmlStr</td></tr>
    </cfloop>
    Just wondering to see if it's good to do it like this.

    Might be faster to convert the xml to a query and then use
    query of queries with a join statement.

  • How do you use BOBJ SDK to retrieve the results of a query in XML

    I am trying to programatically get the results of a query given the query id
    My old code used BusinessObjects Enterprise Web Services API to  Retrieve a document's contents
    DocumentInformation biDocInfo;
    RetrieveData retBOData = RetrieveData.Factory.newInstance();
    Action[] actions = new Action[1];
    retBOData.setRetrieveView(xmlView);
    biDocInfo = rEngine.getDocumentInformation(queryId, null, actions, null, retBOData);
    (XMLView) biDocInfo.getView();
    Is there an equivalent way to retrieve the results of the query using SAP BusinessObjects BI 3.x Developer SDK Library ?
    Thanks for any information

    Hello.
    Are you wanting to use the BusinessObjects Enterprise SDK along with the Report Engine SDK as opposed to using the Web Services SDK that you were using previously?
    Also, what part of a webi document are you trying to get the XML format of?
    - Whole document
    - Single report within a document
    - Report page of a report
    - Report part within a report
    - All data providers
    - Single data provider
    If you are trying to use Business Objects Enterprise along with the Report Engine SDK, there are numerous samples for the various parts of the webi document that I mentioned above available at the following link:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaReportEngineSDKSamples
    I hope that this information helps.
    Regards.
    - Robert

  • How do I Load a clob from an XML field in an XMLTYPE using XMLTABLE ?

    I am trying to load data into a CLOB from a XML field using XMLTABLE.
    I have a SUMMARY xml field with over 100 K of data (potentialy)
    and I can load all the other datatype fields to columns but can not load the xml fields over 4000 characters.
    example
    First I create a table of XMLTYPE. I need to sqlload new files in at regular intervals.
    Create table WEB_XML of XMLTYPE;
    Then I create my relational table....
    create table WEB_WORKING
    request_id varchar(10),
    ref_number varchar(20),
    summary clob
    The I use the .ctl file to sqlload the xml data in
    LOAD DATA
    INFILE *
    INTO TABLE WEB_XML
    append
    xmltype(XMLDATA)
    ext_fname filler char(90),
    XMLDATA LOBFILE(ext_fname) TERMINATED BY EOF
    BEGINDATA
    XMLFILE1.xml
    After loading the WEB_XML table using sqlldr, I try to load my relational table using XMLTable
    INSERT into WEBBAR_WORKING
    request_id ,
    ref_number ,
    summary
    SELECT X.* FROM WEB_XML P2,
    XMLTable ( '//Request//REQUESTVIEW'
    PASSING P2.object_value
    COLUMNS
    "request_id" VARCHAR(10) PATH 'REQUEST_ID',
    "ref_number" VARchar(20) PATH 'REF_NUMBER',
    "SUMMARY" clob PATH 'SUMMARY'
    ) AS X;
    This gives an error saying its not expecting clob
    My XML looks somthing like
    -<Request>
    -<REQUESTVIEW>
    <REQUEST_ID>3140</REQUEST_ID>
    <ref_number>2003-04-02</RECEIVED_DATE>
    <SUMMARY>
    OVER 100 K of data
    </SUMMARY>
    </REQUESTVIEW>
    </Request>

    ok
    that helped lot, im getting there however some more help please
    This SQL
    SELECT request_id, recieved_by, X.SUMMARY.getClobVal()
    FROM WEB_XML P2,
    XMLTable
    '//Request//REQUESTVIEW'
    PASSING P2.object_value
    COLUMNS
    "request_id" VARCHAR(10) PATH 'REQUEST_ID',
    "received_by" VARCHAR(10) PATH 'RECEIVED_BY',
    "SUMMARY" xmltype PATH 'SUMMARY'
    ) AS X;
    SELECT request_id, recieved_by, X.SUMMARY.getClobVal()
    ERROR at line 1:
    ORA-00904: "RECIEVED_BY": invalid identifier
    If I use the X.request_id, X.received_by ......
    i get the error message
    Package or function is in aan invalid state.
    But this SQL was successful in getting the clob by itself but with the XML tgs around it still, how do I strip the XML tags from around this result ?
    SELECT X.SUMMARY.getClobVal()
    FROM WEBBAR_XML P2,
    XMLTable
    '//Request//REQUESTVIEW'
    PASSING P2.object_value
    COLUMNS
    "SUMMARY" XMLTYPE PATH 'SUMMARY'
    ) AS X;
    ----------------------------------------------------------

  • Passing parameters for a query throught XML and capturing response in the same

    Hi All,
    I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
    Below is my XML format.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Insert xmlns="http://tempuri.org/">
    <dataContractValue>
    <dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Insert</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52451</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52452</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Update</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52449</ACC_NO>
    <EMP_CITY>HYD1</EMP_CITY>
    <EMP_NAME>RAKESH1</EMP_NAME>
    <EMP_SALARY>1345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52450</ACC_NO>
    <EMP_CITY>HYDer</EMP_CITY>
    <EMP_NAME>RAKEH</EMP_NAME>
    <EMP_SALARY>1235</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    </dsRequest>
    </dataContractValue>
    </Insert>
    </s:Body>
    </s:Envelope>
     Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
    to the response XML.
    I have 6 defined in RequestParams
    EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
    My Question is:
    When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
                    ResponseParams.Add(
    newdsResponse()
                        ACTION = OriginalParams[a].ACTION,
                        SOURCE = OriginalParams[a].SOURCE,
                        Manager = OriginalParams[a].Manager,
                        RequestParams = OriginalParams[a].RequestParams
    Where the OriginalParams is dsRequest
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

    Hi Kristin,
    My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
    I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
    //function call
    OriginalParams = generator.Function(query, OriginalParams);
    where OriginalParams is List<dsRequest>
    //inside function
    command.Parameters.Add()// parameters adding
    int
    val = command.ExecuteNonQuery();
    after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
    OriginalParams[i].Result.Add(
    newResult()
    { ERROR = "No Error",
    ROWS_EFFECTEFD = 1 });
    //once all the execution is done the response building part
    for(inta
    = 0; a < OriginalParams.Count; a++)
                    ResponseParams.Add(
    newdsResponse()
                      Result = OriginalParams[a].Result
    QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

  • LIKE operator is not working in SQL Query in XML file

    Hi Gurus,
    LIKE operator is not working in SQL query in XML template.
    I am creating a PDF report in ADF using Jdeveloper10g. The XML template is as follows
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="catalogDataTemplate" description="Magazine
    Catalog" defaultPackage="" Version="1.0">
    <parameters>
    <parameter name="id" dataType="number" />
    <parameter name="ename" dataType="character" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
       SELECT ename, empno, job, mgr from EMP where deptno=:id and ename LIKE :ename || '%']]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="EmployeeInfo" source="Q1">
    <element name="EmployeeName" value="ename" />
    <element name="EMPNO" value="empno" />
    <element name="JOB" value="job"/>
    <element name="MANAGER" value="mgr" />
    </group>
    </dataStructure>
    </dataTemplate>
    if i pass the parameter value of :ename from UI, it doesn't filter. But if I give ename = :ename it retrieves the data. Can anyone help me why LIKE operator doesn't work here?
    Appreciate your help,
    Shyamal
    email: [email protected]

    Hi
    Well for a start, you are doing some very strange conversions there. For example...
    and to_char(a.msd, 'MM/DD/YYYY') != '11/11/2030'
    and to_char(a.msd, 'MM/DD/YYYY') != '10/10/2030'If a.msd is a date then you should e converting on the other side ie.
    and a.msd != TO_DATE('11/11/2030', 'MM/DD/YYYY')
    and a.msd != TO_DATE('10/10/2030', 'MM/DD/YYYY')Also, you may want to take into consideration nothing being input in :P2_ITEM_NUMBER like this...
    AND INSTR(a.item_number,NVL(:P2_ITEM_NUMBER,a.item_number)) > 0Is item number actually a number or char field? If it's a number, you want to explicitly convert it to a string for using INSTR like this...
    AND INSTR(TO_CHAR(a.item_number),NVL(TO_CHAR(:P2_ITEM_NUMBER),TO_CHAR(a.item_number))) > 0?
    Cheers
    Ben

  • Query on time field.

    Hi,
    I have a column "Date1" in a table. On the form I define it as Datetime datatye.
    I have the format mask of 'HH24:MI' on that column.
    Iam not able to query on that field.
    Tried adding the foll. code
    ' AND TO_CHAR(MY_TABLE.MY_TIME, ''HH24:MI'') = TO_CHAR(:MY_BLOCK.MY_TIME, ''HH24:MI'') ');
    in pre-query..but doesnot work !! I use the same code in SQL and it works fine..It does retrieve the data...
    Any suggestion...
    Thanks.

    Dear Hareesh and Harish,
    Ooopps the names are confusing. but very close..
    Yes I changed my receiver structure and added <compareOperation> under the key field Material Number. In the Message Mapping , I assigned a constant EQ to <compareOperation>.
    Now tested the proxy will value of Material with no 100 , expecting a response from database for Material 100. But getting error as below.
    xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SAP:Category>XIProtocol</SAP:Category>  
    <SAP:Code area="PARSING">GENERAL</SAP:Code>  
    <SAP:P1 />  
    <SAP:P2 />  
    <SAP:P3 />  
    <SAP:P4 />  
    <SAP:AdditionalText />  
    <SAP:Stack>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Message 53cc7fab-e712-0b20-e100-8000ac10134c(OUTBOUND) expired. at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:746) at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:505) at  
    I am not sure whether there was any response from database.
    I am close to end of this thread..
    Please guide.
    Regards
    Rebecca

  • Tree query using XML SQL

    Hi,
    Any ideas or code samples of how we could use the XML SQL Utility
    to do a tree structure, like the following:
    <GROUP id="grp1">
    <ITEM> item 1 </ITEM>
    <ITEM> item 2 </ITEM>
    <GROUP id="grp2">
    <ITEM> item 3 </ITEM>
    <ITEM> item 4 </ITEM>
    </GROUP>
    <ITEM> item 5 </ITEM>
    </GROUP>
    Thanks,
    Cyril.
    null

    Hi Mark,
    To a certain extent one can modify the xml generated by
    manipulating the query and by using some of the tag name
    customizations which the XSU allows. Unfortunately, what you
    want to create will take more than that; you will have to use
    XSLT - xml transformation language, part of XSL. You will find
    and XSL processor packaged with the oracle xml parser v2 (see
    oraxsl). You can find more info on XSLT at www.w3c.org
    Mark Fortner (guest) wrote:
    : I have an example similar to his:
    : Given a resultset in the form:
    : Company Department User
    : Oracle XML Dev John Smith
    : Oracle XML Dev Jane Smith
    : Oracle Mgmt Larry Ellison
    : Sun Project X Jane Doe
    : Sun Mgmt Scott McNealy
    : which usually results in XML like this
    : <rowset>
    : <row id=1>
    : <Company>Oracle</Company>
    : <Department>XML Dev</Department>
    : <User>John Smith</User>
    : </row>
    : </rowset>
    : how do I get it to look like this?
    : <JTree>
    : <Oracle>
    : <XML Dev>
    : <Jane Smith/>
    : <John Smith/>
    : </XML Dev>
    : <Mgmt>
    : <Larry Ellison/>
    : </Mgmt>
    : </Oracle>
    : <Sun>
    : <Project X>
    : <Jane Doe/>
    : </Project X>
    : <Mgmt>
    : <Scott McNealy/>
    : </Mgmt>
    : </Sun>
    : </JTree>
    : Oracle XML Team wrote:
    : : Hi Cyril,
    : : Your question is a bit vague. Do you have a table which
    you
    : : are trying to query and get the result in the following
    : format?
    : : If these is the case please give me the description of the
    : table
    : : or the view.
    : : The other thing to keep in mind is that even if the XSU
    : can't
    : : give you the XML data in the exactly the format you want, you
    : can
    : : always use XSLT to transform the XML doc generated by the XSU
    : to
    : : the desired XML doc.
    : : Cyril Dunnion (guest) wrote:
    : : : Hi,
    : : : Any ideas or code samples of how we could use the XML SQL
    : : Utility
    : : : to do a tree structure, like the following:
    : : : <GROUP id="grp1">
    : : : <ITEM> item 1 </ITEM>
    : : : <ITEM> item 2 </ITEM>
    : : : <GROUP id="grp2">
    : : : <ITEM> item 3 </ITEM>
    : : : <ITEM> item 4 </ITEM>
    : : : </GROUP>
    : : : <ITEM> item 5 </ITEM>
    : : : </GROUP>
    : : : Thanks,
    : : : Cyril.
    : : Oracle Technology Network
    : : http://technet.oracle.com
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Getting error trying to query db through HS connection

    I am trying to set up a new heterogenous services connection to mimic one on a 10gr2 server. I went through all the trouble of setting everything up, including listener and found out I had to use DG4ODBC instead on 11.2 as they had axed the 10.2 program. So here's my configuration:
    Platform: Windows 2008 Server 64-bit hosting Oracle 11.2.0.1
    Target: Windows 2008 Server hosting SQL Server 2008
    ORACLE_HOME: E:\Oracle\product\11.2.0\dbhome_1
    odbc set up as SYSTEM DSN, name SQLWEB
    ran Dg4odbcConfig.jar file to obtain settings files:
    [E:\Oracle\product\11.2.0\dbhome_1\hs\admin\initSQLWEB.ora]
    HS_FDS_CONNECT_INFO = SQLWEB
    HS_FDS_TRACE_LEVEL=OFF
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1[E:\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora]
    # tnsnames.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    TSA =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = TSORACLE1)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = TSA)
    SQLWEB=
    (DESCRIPTION =
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.168.212)(port=1523))
      (CONNECT_DATA =
       (SID = SQLWEB)
      (HS=OK)
    )(note that 192.168.168.212 is IP for host TSORACLE1)
    tnsping:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\Administrator>tnsping SQLWEB
    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 26-JUL-2
    012 12:43:42
    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
    Used parameter files:
    E:\Oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.168.21
    2)(port=1523)) (CONNECT_DATA = (SID = SQLWEB)) (HS=OK))
    OK (0 msec)
    C:\Users\Administrator>[E:\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora]
    # listener.ora Network Configuration File: E:\Oracle\product\11.2.0\grid\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = TSORACLE1)(PORT = 1521))
    ADR_BASE_LISTENER = E:\Oracle
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON          # line added by Agent
    LISTENER_DYNAMICS =
    (ADDRESS_LIST=
          (ADDRESS=(PROTOCOL=tcp)(HOST=TSORACLE1)(PORT=1522))
    SID_LIST_LISTENER_DYNAMICS=
      (SID_LIST=
          (SID_DESC=
             (SID_NAME=DYNAMICS)
             (ORACLE_HOME=E:\Oracle\product\11.2.0\grid)
             (PROGRAM=dg4odbc)
    LISTENER_SQLWEB =
    (ADDRESS_LIST=
          (ADDRESS=(PROTOCOL=tcp)(HOST=TSORACLE1)(PORT=1523))
    SID_LIST_LISTENER_SQLWEB=
      (SID_LIST=
          (SID_DESC=
             (SID_NAME=SQLWEB)
             (ORACLE_HOME=E:\Oracle\product\11.2.0\grid)
             (PROGRAM=dg4odbc)
    LSNRCTL> status LISTENER_SQLWEB
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=TSORACLE1)(PORT=1523))
    STATUS of the LISTENER
    Alias                     LISTENER_SQLWEB
    Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date                26-JUL-2012 12:15:26
    Uptime                    0 days 0 hr. 29 min. 10 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   E:\Oracle\product\11.2.0\dbhome_1\network\admin\listen
    er.ora
    Listener Log File         e:\oracle\diag\tnslsnr\TSORACLE1\listener_sqlweb\alert
    \log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=TSORACLE1)(PORT=1523)))
    Services Summary...
    Service "SQLWEB" has 1 instance(s).
      Instance "SQLWEB", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfullyI am getting the following error when trying to query from the table:
    C:\Users\Administrator>sqlplus /nolog
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 26 12:46:04 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    SQL> connect apps
    Enter password:
    Connected.
    SQL> select * from mancamp_location@sqlweb;
    select * from mancamp_location@sqlweb
    ERROR at line 1:
    ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from SQLWEB
    SQL>Any suggestions?

    So I saw the error just after I posted. My DB_HOME as listed in the Listener is wrong. It's pointing to my ASM home. Fixed that and now connection works! Hurray!

  • Check boxes, Radio Buttons, and XML Field Order

    I am working with Adobe Designer Version 7.0. Hopefully this forum can still address my issues.
    I am creating a registration form that will often be submitted via email to us for processing. To help make the data both easy to transfer for us into our excel file  and to minimize the errors made by the people using the form, I need the form to be able to do a couple of things that I am having a hard time figuring out. My questions are the following:
    I have a list of 7 check boxes that each insert a dollar value into a seperate numeric field on the form. Each check box has a unique dollar value associated with it. Is there any way to design the form so the user can only choose one of the check boxes? I tried using radio buttons in a group, but if a user mistakenly chose the wrong radio button and then selected another button from that group, it would add to the total in the Application Fee field and not subtract out the previous amount. Below is the code i used for one of the check boxes.
    I have two numeric fields that the user must choose one or the other. Can I design those two fields (numHomes and numBuildings) so that if the you enter a value for one field, you cannot enter a value for the other field? Both fields are then calcuated in a seperate numeric field. Below is the code i used for the numeric field.
    I want to be able to take the data emailed to us as an XML file  when a user submits the results via email and directly paste it into our Excel file. To keep the cut and paste process simple, I want to make sure the order of the XML fields matches the order of the database fields so it can be done in one shot. Do you know how to organize the XML fields? They do not seem to correspond to the ordering found under the Hierarchy tab. Any thoughts on this?
    Thanks
    if (this.rawValue == 1) then
           numAppFee.rawValue = numAppFee.rawValue + 350;
    else
           numAppFee.rawValue = numAppFee.rawValue - 350;
    endif
    numHomes * 50 + numBuildings * 100 + numDups * 10

    Create an XML Schema (XSD) and define that as the default form schema. The form data will conforms to the order of fields defined in the XML schema.
    Hope that helps.
    Nith

  • Want to retrieve multiple XML fragments in CLOBs in a *single query*

    Hi,
    I am trying to retrieve some well formed XML fragments stored as CLOBs from an 8i DB. For a single fragment at a time this is not a problem using <xsql:include-xml>. However, I am trying to retrieve multiple well formed fragments in a single query, "stacked" like so...
    <xsql:include-xml>
    <![CDATA[
    select theXMLFrag from tclob1 where id = 'open'
    union all
    select theXMLFrag from tclob2 --returns multiple rows
    union all
    select theXMLFrag from tclob3 --some more rows
    union all
    select theXMLFrag from tclob1 where id = 'close'
    ]]>
    </xsql:include-xml>
    What I am really after are the contents from the middle two selects. (The 'open' and 'close' bit was just a cheap attempt to ensure that the included XML is well formed.) Though it is not shown in my example, the problem is that the number and source of the CLOB fragments is not known until run time, and I wanted to use a dynamic query to assemble the needed CLOBS...
    I have since learned that <xsql:include-xml> returns the first column of the first row of the query result as parsed XML, either from a CLOB or a VARCHAR containing well-formed XML. So my attempt is no good... all but the first row are ignored.
    Does anyone have any suggestions for a way to do this using the existing xsql tag library? Or will I need to create my own <xsql:action>?
    Thanks,
    Bob Nugent

    Hi,
    Let me correct if i am right:
    - Central Contract -> new concept of SRM 7.0. 1 contract which is visible and usable from ECC and SRM as well. (not available in SRM 5.0 - agree)
    - GOA -> it exist in SRM 5.0 for sure! (we are currenlty using it for ECC procurement).
    The solution what you are mentioned is good...but as you said only for SRM 70...we are in SRM 5.0 and we need solution for here. Do you have any idea?
    Currently i am thinking about a new solution based on "standard" functionalities: if a GOA need to be created for mulitple company, it has to be populated in Header distribution (all company will have the same contract header). It item detail all the required information need to be poupulate in SRM (i.e.: item 1 for p.org1/comp.cod1; item 2 for p.org2/comp.cod2).
    When this is done, the BADI need to check the informatoin in SRM GOA and create contract according to that -> in this case 1GOA is created, but the 2 items for totally different p.org/comp.code, the BADI needs to create 2 different contract in ECC (i would like to avoid using reference purchasing organization in ECC!
    Thanks in advance!
    Best Regards,
    Attila

Maybe you are looking for

  • MacBook Pro in deep trouble...

    Hello! Basically I bought my MacBook Pro 15 inch 2008 late about 3 moths ago from eBay, the seller said that there isn't working trackpad so he give me the apple muse, so I didn't really care about it...but after I get it, the keyboard wasn't working

  • Printing in Black and White issue

    I have a school project that I need to do and it involves pictures. So I went to google, drug pictures to my desktop, and then drug them into pages. So then I tried to print and it printed in Black and White and it needs color because you can not und

  • Tecra S2 can not switch to external display

    With my Tecra S2 and when docked in APR-III replicator, I used to be able to connect my external screen (through DVI) so that it was automatically switching screen output to it by default, not only at startup screen of windows (yes I noted the forum

  • Conversion of .xml, .java, .html etc files to pdf

    Hi All, I want to convert any file format to pdf while check-in any new file. For that, I have used PDFConverter Component and InBoundRefinary. Using this, I can able to convert *.doc, .dox, .xls, .xlsx, .txt* etc files to pdf. But I want to convert

  • Can Iphone sync with any other calendar

    Hi I was wondering if the new Iphone 3G is able to sync with any other calendars other than outlook. If there is a program or something. Thanks for the help Tyler