B1iF 1.5 SQL Call problem with result transformation

Hi all,
i've made a scenario that reads a text file, and for each line, mak an sql call to find corresponding CardCode.
Everything is ok until i want to transform the result of the SQL Call.
Here is the result message
<?xml version="1.0" encoding="UTF-8"?>
<Msg xmlns="urn:com.sap.b1i.vplatform:entity">
  <Body>
    <Payload Role="C" id="atom5_1" system="0010000102" mode="single" method="Automatic detection by key word(Automatic detection by key word)" sql="SELECT CardCode,52657 as CodeTiers FROM OCRD WHERE U_CRL_CODE_DEN=52657" disable-output-escaping="false">
      <ResultSet xmlns="urn:com.sap.b1i.adapter:jdbcadapter" rowCount="0"/>
    </Payload>
    <Payload Role="C" id="atom5_2" system="0010000102" mode="single" method="Automatic detection by key word(Automatic detection by key word)" sql="SELECT convert(varchar,(Max(Convert(int,substring(CardCode,2,len(CardCode)-1))) + 1),20) as NewCardCode FROM OCRD WHERE Left(CardCode,1)= 'F' AND ISNUMERIC(substring(CardCode,2,len(CardCode)-1))=1" disable-output-escaping="false">
      <ResultSet xmlns="urn:com.sap.b1i.adapter:jdbcadapter" rowCount="1">
        <Row>
          <NewCardCode>3</NewCardCode>
        </Row>
      </ResultSet>
    </Payload>
  </Body>
</Msg>
When i apply the following XPath expression :
//Msg/Body/Payload[@id='atom5_2']/jResultSet/Row/NewCardCode
It gives nothing. So i've tried with XML Copy Editor, i've changed xmlns="urn:com.sap.b1i.adapter:jdbcadapter" to xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" and it works.
It seems that the namespace is incorrect at the ResultSet level.
So, here is my question : Why the SQL Call doesn't give the expected output ? How to correct it ?
Thanks in advance !

Well, i found a way to do it using local-name() function. it gives the following :
<xsl:value-of select="$msg5_2[$Pos1]/*[local-name()='ResultSet']/*[local-name()='Row']/*[local-name()='NewCardCode']"></xsl:value-of>
The job is done, but this not easy to read.

Similar Messages

  • Problems with xml transformation via xslt - strange results

    hi everybody...
    i've little trouble finalling a little tool programmed by myself for my education.
    the application contains a kind of document-server which enables the client to up- and download xml-document in a special format to/from the server.
    in case of the xml-dtd of client and server are different (same type of content, different dtd) the server implements a method called transform(StreamSource source, StreamSource xsl_stylesheet, StreamResult result) which contains the following code:
        transform(StreamSource source, StreamSource xml_stylesheet, StreamResult result) {
          try {
            TransformerFactory factory = TransformerFactory.newInstance();
            Templates template = factory.newTemplates(xsl_stylesheet);
            Transformer transformer = template.newTransformer();
            transformer.transform(source, result);
            return true;
          catch(Exception e) {
            return false;
        }the method is called by the methods downloadFile(...) and uploadFile(...) which both generate the different StreamSource- and StreamResult-Objects.
    by using the downloadFile(...) method, the requested file is transformed, stored temporary in a tmp-directory, read in and send to the requesting client.
    by using the uploadFile(...) method, the sent file is stored temporary in the tmp-directory, read in, transformed and stored as new server-document (if the file still exists it will be overwritten).
    My Problem:
    the result files generated by transform(SreamSource source, StreamSource xsl_stylesheet, StreamResult result) look strange. That means the result xml-code is not equal to the result xml-code i generated by transforming my xml-documents with saxon.
    The xsl files are correct and the xml files are wellformed as well as they are valid.
    The result files look like this:
    <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?>
       XYZ
       ABC
          1
          piece
          One piece of ABC(-> <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?> is a "string" of code from the source xml-file...)
    The result should look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE a-resource SYSTEM "../dtd/A.dtd">
    <a-resource id="XYZ">
       <a-type>ABC</a-type>
       <a-data>
          <a-value>1</a-value>
          <a-unit>piece</a-unit>
          <a-descr>One piece of ABC</a-descr>
       </a-data>
    </a-resource>Is there anyone who knows what kind of mistake i did in my transform(...) method??
    Do I need to add some attributes to any of the Objects of Template of Transformer??
    please... help me
    i've been testing now over two nights long but couldn't find any solution how to bring my application to work "correct".
    thanks,
    Thof!!!

    ok...
    i got it!
    seems like jaxpi is unable to convert files with extensions different to .xml ...
    now it's working

  • Problem with Result Analysis report (KKAK)

    Hello Experts,
    I am facing problem with T-code KKAK, when I am executing this transaction (Results Analysis (RA) on sales orders creates the data for posting to the GL, depending on the sales order (i.e. WIP or COS) ) system is displaying/calculating for all sales order which are already completed (fully shipped and billed), this report displaying in 300 to 400 pages.
    My requirement is  .. is it possible to display only sales orders which are no completed. This will help alot.
    Please help me to solve this problem.
    Thanks
    Sudheer

    Hi,
    in the selection screen of KKAK in "Output options" there is a flag "display closed items".
    Uncheck this and ensure that all completely processed orders have status closed (CLSD).
    Thus they will not be reported anymore.
    BR Christian

  • Missed call problem with 5s

    Hi
    I bought new iPhone 5s yesterday. But I have small problem about missing call.
    When somebody called me and if I missed that call , I can see who called me at the phone tab and last call selection with red colour. And also I can see missed call on the notification center missed tabs.
    But missing calls 24 hours stayed notification center although I deleted last call selection in phone tab. Is it normal for ıos 7 ?
    Thanks for hand.

    Apple is not here. This is a user to user technical support forum. If you would like to provide feedback to Apple, do so here:
    Apple - Feedback
    Cheers,
    GB

  • SQL Developer - Problem Exporting Results at times - ver 1.5.3 build 5783

    Hi,
    I have been having intermittent problems with running a query and then trying to export the results into an excel spreadsheet. Sometime I have no problem, it brings up the dialog box and I can export. Other times I select export data and pick xls or other export types and nothing happens. I'm trying to understand what could be causing it to work sometimes and not others. Any ideas would be appreciated.
    Ray

    Export has been causing problems over all versions, but in generally are getting better over time. I suggest you try 1.5.5, which fixes several problems.
    Hope that helps,
    K.

  • Problems with result area in workbooks after upgrade to BW 3.5

    Hi,
    we are experiencing some problems with our <b>workbooks</b> after the upgrade to BW 3.5. When refreshing all queries in a workbook (that was there before 3.5) without selecting a specific query we get the message <b>'Result area</b> cannot be found, specify a new one'. After selecting, the message appears again in an infinite loop.
    Has anybody had similar problems and has found a solution for this?
    Thanks,
    EMS

    Hi,
    I am having that message, always if I delete a Sheet which contains an embeded query.
    Even the sheet is deleted, the SAPBEX has information of all the embeded queries, and tries to find the Result area to put the data.
    To find out if this is your case as well,
    select an empty cell in a Sheet and continue like that, until all the embeded queries are been displayed.
    Regards
    Vasso
    Message was edited by: VASSILIKI SIAGRI

  • Nokia e75 calling problem with HONDA handsfree sys...

    Hello,
    i am having problem with calling operations in my Honda Accord 2009. I paired the device correctly and successfully via bluetooth and also imported phone book, but when i try to call a name from address book, the system says: CALLING, but then nothing happens and the phone's Keyboard locks in that time and I have to try again manually.
    Any ideas.

    i just received a reply from honda:
    Thank you for contacting us.The Nokia E75  has been tested and unfortunately is not compatible with your Honda Accord 2009.To guarantee an compatibility as high as possible we use only standardised Bluetooth protocols for our system.
    Unfortunately some manufacturer use slightly modified protocols, which might cause the incompatibility.
     Awesome now what can i do?
    The phone is new, so clearly i am not going to buy a new one. 
    Is there any way to get it working, maybe some kind of tweak or something.
    thank you for any additional replies.

  • Problem With Match Transformation

    Hi ,
    I am using Match transformation to find the duplicates .
    My input data like this
    EMP NO     ENAME         SAL     DEPTNO
    10     SRIRAM MV  10000     100
    11     MV SRIRAM  11000     100
    12     SRIRAM PV  11000     100
    13     SRIHARI       11000     100
    14     SUBBIAH       11000     100
    15     RAMANA       11000     100
    Iam finding the duplicates on Ename .
    My ename data like SRIRAM MV, MV SRIRAM  like that data . both are duplicate records . for that iam using WORD SIMILARITY  option instead of field similarity with match score is 100 and no match score is 99.
    But i am getting all are unique records .
    If i am using match score is 85 and no match  score is 84 then iam getting the result like this .
    EMP NO     ENAME     SAL     DEPTNO     GROUP_NUMBER     MATCH_STATUS     MATCH_SCORE
    11     MV SRIRAM     11000     100     1     P     94
    15     RAMANA     11000     100          U     
    13     SRIHARI     11000     100          U     
    10     SRIRAM MV     10000     100     1     D     
    12     SRIRAM PV     11000     100     1     P     88
    14     SUBBIAH     11000     100          U     
    means MV SRIRAM,SRIRAM MV ,SRIRAM PV  comes under one group number with SRIRAM MV  as driver and MV SRIRAM as passenger with 94 similarity score and  SRIRAM PV as passenger with 88 score.
    While i am using the match score i need to get 100% per SRIRAM MV and MV SRIRAM . then whats the settings needed to get correct result. whats the problem with my settings.
    Please help me out to solve the problem
    Thanks&Regards,
    Ramana.

    Ramana,
    <<< My ename data like SRIRAM MV, MV SRIRAM like that data . both are duplicate records . for that iam using WORD SIMILARITY option instead of field similarity with match score is 100 and no match score is 99. >>>
    You are looking for an exact match here, but MV SRIRAM and SRIRAM MV are not exactly the same.  The characters MV are in different positions.  The Word Similarity option compares words instead of the entire field, but the character position also affects the match score.
    <<< While i am using the match score i need to get 100% per SRIRAM MV and MV SRIRAM . >>>
    You cannot force the the match score to be a specific value.  SRIRAM MV and MV SRIRAM are not a 100% match and never will be.  What you need to do is adjust the match settings so that the dupe group includes SRIRAM MV and MV SRIRAM but excludes SRIRAM PV.  Try Match Score = 90 and No Match Score = 89.

  • Problem with x:transform function : translation with XSLT

    I've got a problem with this code :
    This is the XML file :
    <%@taglib prefix="x" uri="http://java.sun.com/jstl/xml"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <c:import var="xslDoc" url="test.xsl"/>
    <x:transform  xslt ="${xslDoc}">
      <students>
      <student id="1">
       <name>
         <first>John</first>
         <last>Smith</last>
         <middle>T</middle>
       </name>
       <grade>
         <points>72</points>
         <letter>C</letter>
       </grade>
      </student>
    </students>
    </x:transform>This is the XSLT :
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="students">
      <html>
      <head>
      <title>XSLT Transform</title>
      </head>
      <body>
       <table border="1">
       <tr><th>First</th><th>Last</th>
    <th>Points</th><th>Letter</th></tr> 
       <xsl:apply-templates/>
       </table>
       </body>
      </html>
    </xsl:template>
    <xsl:template match="student">
      <tr>
       <td><xsl:value-of select="name/first"/></td>
       <td><xsl:value-of select="name/last"/></td>
       <td><xsl:value-of select="grade/points"/></td>
       <td><xsl:value-of select="grade/letter"/></td>
      </tr>
    </xsl:template>
    </xsl:stylesheet>I use NetBeans 3.5.1 for compiling and testing, and on my machine all works fine.
    But when i upload the code on the server i''ve this type of error :
    HTTP Status 500 - Internal Server Error
    exception
    org.apache.jasper.JasperException: access denied (java.util.PropertyPermission org.xml.sax.driver read)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    java.security.AccessControlException: access denied (java.util.PropertyPermission org.xml.sax.driver read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
         at java.lang.System.getProperty(System.java:572)
         at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:81)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.getSource(TransformSupport.java:280)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.getSource(TransformSupport.java:276)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:159)
         at org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(TransformTag.java:104)
         at org.apache.jsp.test_jsp._jspService(test_jsp.java:78)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
         at java.lang.Thread.run(Thread.java:536)
    org.apache.jasper.JasperException: access denied (java.util.PropertyPermission org.xml.sax.driver read)It seems a permission problem, but my experience with JSP is very poor , i've asked to control to my host
    the policy of the folders but they didn't respond me yet.
    Any suggestion ?
    Thx for reading, and sorry for my rusty english :-P

    Thanks.
    I've already tried to insert the whole path. You mean this,right ?
    <c:import var="xslDoc" url="http://www.domain.net/examples/test.xsl"/>I've searched a lot with google but i haven't find anything.
    I've not searched a lot into the jakarta site, I'll do tomorrow, now it's
    a bit late (1:45 AM in Italy :-0 ), so i think that i'll go to sleep.
    Thanks for responding so soon!
    I'll wait for your new infos.
    Thanks again.
    read you tomorrow.

  • Web service call problem with complex types input

    We are trying to call a web service and pass as parameter
    some complex types. When invoking the web service everything works
    well on flex side, but on the server side the input parameters we
    get from flex are not correct - complex type is removed and the
    elements of the complex type are sent. See the example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:WebService id="ws_id" wsdl="link" useProxy="false"
    fault="wsFault(event)">
    <mx:operation id="op_id" name="op"
    result="wsResult(event)">
    <mx:request>
    <parameters>
    <parameter1>{value1}</parameter1>
    <parameter2>{value2}</parameter2>
    <parameter3>{value3}</parameter3>
    <parameter4>
    <parameter4_1>{value4_1}</parameter4_1>
    <parameter4_2>{value4_2}</parameter4_2>
    <parameter4_3>{value4_3}</parameter4_3>
    </parameter4>
    </parameters>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    </mx:Application>
    on server side we get this:
    <parameters>
    <parameter1>{value1}</parameter1>
    <parameter2>{value2}</parameter2>
    <parameter3>{value3}</parameter3>
    <parameter4_1>{value4_1}</parameter4_1>
    <parameter4_2>{value4_2}</parameter4_2>
    <parameter4_3>{value4_3}</parameter4_3>
    </parameters>
    Instead of :
    <parameters>
    <parameter1>{value1}</parameter1>
    <parameter2>{value2}</parameter2>
    <parameter3>{value3}</parameter3>
    <parameter4>
    <parameter4_1>{value4_1}</parameter4_1>
    <parameter4_2>{value4_2}</parameter4_2>
    <parameter4_3>{value4_3}</parameter4_3>
    </parameter4>
    </parameters>
    Any idea how is it possible to send complex type as web
    service input from flex ?

    Hi,
    I also have similar type of problem where I need to invoke a Web service with Complex input parameters.
    I followed Susan's blog but I stuck at a point where methos getItem is created.
    Can anyone tell me how to get that method for my requirement.
    If possible can you guys share your solutions here.
    Thanks in advance.

  • SQL Developer:Problem with multi byte size after import using excel format

    Hi,
    Need your help. I am trying to export multibyte characters from our China instance(r11i instance) using SQL Developer's export data via Excel format into an R12 Vision instance. I have a staging table with exactly the same structure in both instances. Prior to export to excel, I check the byte size of the sample data below using LENGTH and LENGTHB sql functions and these are the results:
    Sample data = 材料LI(USD)
    LENGTH=9
    LENGTHB=13
    Then, I exported the table as excel file. Afterwards, I used SQL Developer to import the excel file into the table of the target instance. I check the bytesize again and here are the results:
    Sample data = 材料LI(USD)
    LENGTH=9
    LENGTHB=17
    The byte size increased from 13 to 17. I did not change anything on the excel file. Just straight forward export to excel file then imported it to the target instance. How come there is an increase in byte size? Has anyone encountered this in SQL Developer? We really need to export the files as excel.
    Source:
    Database version = 9.2.0.5.0
    Target:
    Database version = 11.1.0.7.0
    Regards,
    Wendell
    Edited by: user13038177 on May 13, 2010 9:05 PM
    Edited by: user13038177 on May 13, 2010 9:06 PM

    Wendell,
    This forum is for handling issues migrating from non-Oracle databases to Oracle databases.
    As this is an Oracle to Oracle issue using SQL*Developer export it would be better to open a new thread in the SQL*Developer forum -
    SQL Developer
    There will be more people there who can help with this problem.
    Regards,
    Mike
    Edited by: mkirtley on May 14, 2010 10:16 AM

  • MS SQL Server problem with MDB's: javax.transaction.xa.XAException

              I am programming agents in j2ee and using MDB to implement the asynchronicity of
              the agents.
              Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
              the agent's ID and the action that the agent has to perform. The MDB creates a
              SFSB, and calls the appropriate action from this session bean. Those actions require
              to read and write from my MS SQL Server 2000 XA database. But when running my
              program, I often get this error, which doesn't seem to affect the action, because
              when I check my database data, everything is updated correctly. So the program
              still completes, but the errors slow down the execution (the program hangs for
              about 3 seconds, each time the error occurs).
              Does anybody has an explanation or solution for this?
              Thank you...
              This is the error output:
              onMessage()
              Reading MapMessage: 1
              <26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
              commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
              [Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
              (0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
              left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
              Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
              Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
              Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
              XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
              javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
              (0)returns -4
              at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
              Source)
              at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
              at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
              at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
              at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              --------------- nested within: ------------------
              weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
              Pool
              [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
              exception:
              [javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
              (0) returns -4]
              at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
              

              I am programming agents in j2ee and using MDB to implement the asynchronicity of
              the agents.
              Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
              the agent's ID and the action that the agent has to perform. The MDB creates a
              SFSB, and calls the appropriate action from this session bean. Those actions require
              to read and write from my MS SQL Server 2000 XA database. But when running my
              program, I often get this error, which doesn't seem to affect the action, because
              when I check my database data, everything is updated correctly. So the program
              still completes, but the errors slow down the execution (the program hangs for
              about 3 seconds, each time the error occurs).
              Does anybody has an explanation or solution for this?
              Thank you...
              This is the error output:
              onMessage()
              Reading MapMessage: 1
              <26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
              commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
              [Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
              (0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
              left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
              Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
              Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
              Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
              XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
              javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
              (0)returns -4
              at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
              Source)
              at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
              at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
              at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
              at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              --------------- nested within: ------------------
              weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
              Pool
              [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
              exception:
              [javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
              (0) returns -4]
              at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
              

  • XML load using PL/SQL (XSU) problem with dtd file.

    Hi,
    I'm trying to load a xml file and receives this errormassage:
    SQL> exec loadxml;
    In Exception
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
    'Businesscard.DTD'.
    Any idea what I can change? Below is the things I've done and also how the xml file looks
    and the dtd file.
    Regards
    Jorgen
    CREATE DIRECTORY XML_DIR AS 'C:\XML';
    CREATE TABLE XML_TEMP (key NUMBER, f_lob BFILE);
    INSERT INTO XML_TEMP VALUES (1,BFILENAME('XML_DIR','TeleAdressVKI0209021728.xml'));
    CREATE TABLE XML_DOC (
    Key1 VARCHAR2(32),
    Key2     VARCHAR2(32),
    Key3 VARCHAR2(32),
    Terminate     VARCHAR2(3),
    LegalName     VARCHAR2(420),
    PopName          VARCHAR2(420),
    StreetName     VARCHAR2(60),
    StreetNumber     VARCHAR2(10),
    PostNumber     VARCHAR2(10),
    PostAdress VARCHAR2(30),
    CordinateLevel     VARCHAR2(32),
    xCor          VARCHAR2(10),
    yCor VARCHAR2(10),
    PoiCategory VARCHAR2(32),
    Telephone VARCHAR2(30));
    CREATE OR REPLACE PROCEDURE loadxml AS
    fil BFILE;
    buffer RAW(32767);
    len INTEGER;
    insrow INTEGER;
    BEGIN
    SELECT f_lob INTO fil FROM xml_temp WHERE key = 1;
    DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    len := DBMS_LOB.GETLENGTH(fil);
    DBMS_LOB.READ(fil,len,1,buffer);
    xmlgen.resetOptions;
    insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    DBMS_OUTPUT.PUT_LINE(insrow);
    IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    DBMS_LOB.FILECLOSE(fil);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('In Exception');
    DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    DBMS_LOB.FILECLOSE(fil);
    END IF;
    end;
    The xml file look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Cards SYSTEM 'Businesscard.DTD'>
    <Cards>
    <Comment>TeleAdress initial</Comment>
    <OldFile>xxxx</OldFile>
    <NewFile>xxxx</NewFile>
    <Card>
    <Key1>95352</Key1>
    <Key2>159651</Key2>
    <Key3>3807868</Key3>
    <Terminate>no</Terminate>
    <Cardholder>
    <LegalName>
    <Name>
    <Full>AXFOOD DIREKT AB</Full>
    </Name>
    </LegalName>
    <PopName>
    <Name>
    <Full>WILLYS LEGPRIS AB</Full>
    </Name>
    </PopName>
    </Cardholder>
    <Location>
    <Address>
    <StreetInfo>
    <StreetName>BAGARBYVDGEN</StreetName>
    <StreetNumber>61</StreetNumber>
    </StreetInfo>
    <ZipCode>19134</ZipCode>
    <City>SOLLENTUNA</City>
    <Coordinate>
    <Level>1</Level>
    <xCor>1620480</xCor>
    <yCor>6592717</yCor>
    </Coordinate>
    </Address>
    <Business>
    <POI>
    <POIId>46</POIId>
    <POIId>84</POIId>
    </POI>
    <InfoRow>
    <Subscriptions>
    <TelAddress>08 6234540</TelAddress>
    </Subscriptions>
    </InfoRow>
    </Business>
    </Location>
    </Card>
    <Card_Count>1</Card_Count>
    </Cards>
    the dtd file looks like this:
    <!-- BusinessCard.dtd -->
    <!-- History:          See end of this file -->
    <!-- Description:      This DTD is used for transferring business cards-->
    <!--               from TeleAdress Information AB to its customers. -->
    <!--===================== Root Element ===========================-->
    <!ELEMENT     Cards     (Comment,OldFile?,NewFile,Card*,Card_Count)>
         <!ELEMENT     Comment                         (#PCDATA)>
         <!ELEMENT     OldFile                         (#PCDATA)>
         <!ELEMENT     NewFile                         (#PCDATA)>
    <!--===================== Card ============================-->
    <!ELEMENT     Card     (Key1, Key2, Key3, Terminate, (RegNo?, Cardholder, Row*)?)>
         <!ELEMENT     Key1          (#PCDATA)>
         <!ELEMENT     Key2          (#PCDATA)>
         <!ELEMENT     Key3          (#PCDATA)>
         <!ELEMENT     Terminate     (#PCDATA)> <!-- Values can be yes or no-->
    <!--====================== Cardholder ============================-->
    <!ELEMENT     Cardholder     (RegNo, OrgType, LegalName, PopName?, Location)     >
         <!ELEMENT     RegNo          (#PCDATA)>
         <!ELEMENT     OrgType          (#PCDATA) >
    <!--====================== RegName ==================================-->
    <!ELEMENT     LegalName          (Name)>
    <!--====================== PopName ==================================-->
    <!ELEMENT     PopName          (Name+)>
    <!--====================== Location ==================================-->
    <!ELEMENT     Location          (Adress+, Unit*, Business)>
    <!--====================== Unit ==================================-->
    <!ELEMENT     Unit          (UnitNo, UnitName?, Status, HQ, SNI1?, SNI2?, SNI3?, WorkPlaceNo, WorkPlaceName?)>
         <!ELEMENT     UnitNo          (#PCDATA)>
         <!ELEMENT     UnitName     (#PCDATA)>
         <!ELEMENT     Status          (#PCDATA)>
         <!ELEMENT     HQ          (#PCDATA)> <!-- Values can be yes or no-->
         <!ELEMENT     SNI1          (#PCDATA)>
         <!ELEMENT     SNI2          (#PCDATA)>
         <!ELEMENT     SNI3          (#PCDATA)>
         <!ELEMENT     WorkPlaceNo     (#PCDATA)>
         <!ELEMENT     WorkPlaceName     (#PCDATA)>
    <!--====================== Business ==================================-->
    <!ELEMENT     Business          (POI?, InfoRow*)>
    <!--====================== POI =======================================-->
    <!ELEMENT     POI          (POIId+)>
         <!ELEMENT     POIId          (#PCDATA)>
    <!--====================== InfoRow ===================================-->
    <!ELEMENT     InfoRow          (Number,Heading*,Name?, Address?, Text?, HomePageAddresses?, EMailAddresses?, Subscriptions?)>
         <!ELEMENT     Number          (#PCDATA)>
    <!--====================== Heading =================================-->
    <!ELEMENT     Heading          (LevelNo, LevelName)>
         <!ELEMENT      LevelNo          (#PCDATA)>
         <!ELEMENT     LevelName     (#PCDATA)>
    <!--====================== Name =================================-->
    <!ELEMENT     Name          (Full,First?,Middle?,Last?)>
         <!ELEMENT      Full          (#PCDATA)>
         <!ELEMENT     First          (#PCDATA)>
         <!ELEMENT     Middle          (#PCDATA)>
         <!ELEMENT     Last          (#PCDATA)>
    <!--====================== Address ==============================-->
    <!ELEMENT     Address               (Type, StreetInfo?,TextBeforeZipCode?,ZipCode?,City?,AReg?,
                             Municipality?,County?,Country?,Coordinate?)>
         <!ELEMENT     Type               (#PCDATA)>     
         <!--====================== StreetInfo ==============================-->
         <!ELEMENT     StreetInfo          (PostBox?, StreetName?,StreetNumber?,Entrance?, CO?)>
              <!ELEMENT     PostBox               (#PCDATA)>
              <!ELEMENT     StreetName          (#PCDATA)>
              <!ELEMENT     StreetNumber          (#PCDATA)>
              <!ELEMENT     Entrance          (#PCDATA)>
              <!ELEMENT     Co               (#PCDATA)>
         <!ELEMENT     TextBeforeZipCode     (#PCDATA)>
         <!ELEMENT     ZipCode               (#PCDATA)>
         <!ELEMENT     City               (#PCDATA)>
         <!ELEMENT     AReg               (#PCDATA)>     
         <!ELEMENT     Municipality          (#PCDATA)>
         <!ELEMENT     County               (#PCDATA)>
         <!ELEMENT     Country               (#PCDATA)>
         <!--====================== Coordinate ==============================-->
         <!ELEMENT     Coordinate          (Level, xCor,yCor)>
              <!ELEMENT     Level          (#PCDATA)>
              <!ELEMENT     xCor          (#PCDATA)>
              <!ELEMENT     yCor          (#PCDATA)>
    <!--====================== Text =================================-->
    <!ELEMENT     Text          (InfoText+)>
         <!ELEMENT     InfoText          (#PCDATA)>     
    <!--====================== HomePageAddresses =================================-->
    <!ELEMENT     HomePageAddresses          (HomePage+)>
         <!ELEMENT     HomePage          (#PCDATA)>     
    <!--====================== EMailAddresses =================================-->
    <!ELEMENT     EMailAddresses          (EMail+)>
         <!ELEMENT     EMail          (#PCDATA)>     
    <!--======================= Subscriptions ===========================-->
    <!ELEMENT     Subscriptions     (ClassifiedCode?, Type, TelAddress, TextAfter?)     >
         <!ELEMENT     TelAddress     (#PCDATA)>
         <!ELEMENT     TextAfter     (#PCDATA)>
    <!ELEMENT     Card_Count               (#PCDATA)>
    <!--==============================================================-->
    <!-- History:          2002-06-06 created this file -->
    <!--                2002-07-04 Added Source on Coordinates -->
    <!--               2002-08-15 Changed Source to Level -->
    <!--               2002-08-15 Changed RegName to LegalName-->

    I've got the same problem,
    How to define the directory in witch the DTD is????
    We need something like DBMS_XMLSave.setdirectoryDTD, that doesn't exist.
    ben
    ERREUR ` la ligne 1 :
    ORA-29532: appel Java arrjti par une exception Java non interceptie :
    oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
    'annoncesv22.dtd'.
    ORA-06512: ` "SDEV.SIMPORT", ligne 205
    ORA-06512: ` ligne 1

  • SQL Loader Problem with Date Format

    Dear all,
    I am dealing with a problem in loading data with SQL Loader. The problem is in the date format.
    More specifically, I created the following Control File:
    file.ctl
    LOAD DATA
    INFILE 'D:\gbal\chatium.log'
    APPEND INTO TABLE CHAT_SL
    FIELDS TERMINATED BY WHITESPACE
    TRAILING NULLCOLS
    (SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL2 char,
    SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL4 char,
    SL5 char,
    SL6 char,
    SL7 char,
    SL8 char,
    SL9 char,
    SL10 char,
    SL11 char,
    SL12 char,
    SL13 char,
    SL14 char,
    SL15 char)
    The data we want to load are in the following file:
    Apr 29, 2007 12:05:49 AM 1060615 Apr 29, 2007 12:05:35 AM 306978537730 24026384 chatium.user.userinfo WAP 0
    Apr 29, 2007 12:12:51 AM 1061251 Apr 29, 2007 12:12:27 AM 306978537730 24026384 chatium.channel.list WAP 0
    Apr 29, 2007 12:12:51 AM 1061264 Apr 29, 2007 12:12:32 AM 306978537730 24026384 chatium.channel.listdetail WAP 0
    Apr 29, 2007 12:13:51 AM 1061321 Apr 29, 2007 12:13:31 AM 306978537730 24026384 chatium.user.search WAP 0
    Apr 29, 2007 12:13:51 AM 1061330 Apr 29, 2007 12:13:37 AM 306978537730 24026384 chatium.user.userinfo WAP 0
    The error log file is the following:
    SQL*Loader: Release 9.2.0.1.0 - Production on Mon Apr 30 11:29:16 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Control File: file.ctl
    Data File: D:\gbal\chatium.log
    Bad File: chatium.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table CHAT_SL, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    SL1 FIRST * WHT DATE MonDD,YYYYHH:MI:SS
    SL2 NEXT * WHT CHARACTER
    SL3 NEXT * WHT CHARACTER
    SL4 NEXT * WHT CHARACTER
    SL5 NEXT * WHT CHARACTER
    SL6 NEXT * WHT CHARACTER
    SL7 NEXT * WHT CHARACTER
    SL8 NEXT * WHT CHARACTER
    SL9 NEXT * WHT CHARACTER
    SL10 NEXT * WHT CHARACTER
    SL11 NEXT * WHT CHARACTER
    SL12 NEXT * WHT CHARACTER
    SL13 NEXT * WHT CHARACTER
    SL14 NEXT * WHT CHARACTER
    SL15 NEXT * WHT CHARACTER
    Record 1: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 2: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 3: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 4: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    I wonder if you could help me.
    Thank you very much in advance.
    Giorgos Baliotis

    SQL> select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS FF3AM') from dual;
    select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS FF3AM') from dual
    ERROR at line 1:
    ORA-01821: date format not recognized
    SQL> ed
    Wrote file afiedt.buf
      1* select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS AM') from dual
    SQL> /
    TO_DATE(
    29/04/07
    SQL> Then, you defined blank space as separator, but there is spaces in your date inside your file. So, you should add double-quotes around the date field like below, and add optionally enclosed by '"' into your ctlfile.
    "Apr 29, 2007 12:05:49 AM" 1060615 "Apr 29, 2007 12:05:35 AM" 306978537730 24026384 chatium.user.userinfo WAP 0
    "Apr 29, 2007 12:12:51 AM" 1061251 "Apr 29, 2007 12:12:27 AM" 306978537730 24026384 chatium.channel.list WAP 0
    "Apr 29, 2007 12:12:51 AM" 1061264 "Apr 29, 2007 12:12:32 AM" 306978537730 24026384 chatium.channel.listdetail WAP 0
    "Apr 29, 2007 12:13:51 AM" 1061321 "Apr 29, 2007 12:13:31 AM" 306978537730 24026384 chatium.user.search WAP 0
    "Apr 29, 2007 12:13:51 AM" 1061330 "Apr 29, 2007 12:13:37 AM" 306978537730 24026384 chatium.user.userinfo WAP 0Example :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#sthref477
    Nicolas.

  • Strange problem with results ordering

    Hi!
    I select some varchar2 data and order them:
    SELECT rownum, xyz FROM analitika where xyz <= 'ABC' order by xyz
    This is pretty straightforward, no problems expected here, right? However, the results, when read as they pour in, are not ordered. I get something like
    3 abc
    1 aaa
    2 abb
    Rownums are assigned correctly, but the data has not been sent in correct order. I feel this has something to do with connection settings, that it is set to return any results as quickly as possible.
    The database is 10g XE on fedora core 4.

    Ok, here is the actual data from the database (copy/paste from helpdb). I have removed rownum from the query because it seems to cause confusion.
    Please notice these things:
    A.A.M.-MIHALINEC kd
    A&B doo
    A.B.A. D.O.O.
    The sequence of rows beginning with "A." should not have been interrupted by the row beginning with "A&". There are more examples. BTW, shouldn't numbers come before letters?
    After I have looked closer, it seems that oracle has disregarded any non-alphanumeric characters when sorting.
    SELECT naziv from analitika where naziv <= 'ABC' order by naziv
    NAZIV
    A & B d.o.o.
    A CETIRI INFO d.o.o.
    A KAJ
    A KONZALTING
    A S I
    A&A
    AAG DIZAJN CENTAR d.o.o. ZAGREB
    AAG DIZAJN CENTAR d.o.o. ZAGREB
    A.A.M.-MIHALINEC K.D.
    A.A.M.-MIHALINEC k.d.
    A.A.M.-MIHALINEC kd
    AAP ELEKTRONIK
    AAR
    AARIS
    AB AUTOMATIKA
    AB COLOR d.o.o.
    AB COMERCE D.O.O.
    AB DIZAJN - VL. MIRA BILIC
    A&B doo
    AB GRADNJA OBRT
    AB INTELCOM
    AB PETROL PROMET
    AB SITOTISAK
    A.B.A. D.O.O.
    A.B.A. DOO
    ABA VELA
    ABACUS
    ABACUS - OBRT
    ABACUS d.o.o. VRBOVEC
    ABAK INŽENJERING
    ABAKUS
    ABAK-US DOO
    ABAKUS RACUNALA
    ABATON
    ABATON D.O.O.
    ABATOURS
    ABB d.o.o. KARLOVAC
    ABB d.o.o. ZAGREB
    ABB d.o.o. ZAGREB
    ABBA D.O.O.
    ABBOTT LABORATORIES S.A. Diagnostics
    A.B.I.G
    A.C.N. D.O.O.
    A/D ELECTRONIC D.O.O.
    A/D ELECTRONIC d.o.o.
    A.D. VIŠNJAN
    A.D.C. d.o.o.
    A-DESIGN
    A!DESIGN OBRT
    A.D.INFORMATICKI SUSTAVI d.o.o.
    A.D.-PROMET d.o.o.
    A.D.Z.SARŠON
    A.H. - ZAGREB d.o.o.
    A.H.TRGOVINA d.o.o.
    A.K.S. d.o.o.
    A-KUD
    A.M. ELEKTRONIK - OBRT, VL. ANIC M.
    A-MAR d.o.o.
    A.M.E.C.
    A.M.E.C. d.o.o.
    A.M.H. d.o.o.
    A.M.-HIDRAULIKA
    A.M.-HIDRAULIKA
    A.M.I. LOVREKOVIC d.o.o.
    A.M.S. CONTO D.O.O.
    A.M.T. PETRAVIC
    A.N.A.B.A.R. TOURS
    A.P. FRIGO
    A-PROMA
    A.R.M.A.C.O.M. d.o.o.
    A.R.Z.
    A.S. REVIZOR D.O.O.
    A.S.B.
    A.S.D.
    A.S.I. d.o.o.
    A.S.TEKS D.O.O.
    A.S.T.-PROM d.o.o.
    A.Š. HAJDUK
    A.Š.-GAZELA D.O.O.
    A-TEL
    A.T.O.S. ELECTRONIC d.o.o.
    A.V.V.I.S.
    A.Z. PROMET
    A.Z.I.L.
    A1 CENTAR D.O.O.
    /popuniti sa drugim kupcem
    007 MILETIC k.d.
    2. A.M. D.O.O.
    2 A.M. doo
    2. GARDIJSKA BRIGADA MORH
    2 I d.o.o.
    2 N
    2D IMPULS d.o.o.
    2M COMPUTERS d.o.o. BLOKADA!
    2M D.O.O.
    3 C CONING
    3 DK d.o.o.
    3 Ka
    3 M
    3 M ŠPORT
    3. MAJ BRODOGRADILIŠTE d.d.
    3. MAJ MOTORI I DIZALICE d.d.
    3. MAJ OEK
    3. MAJ TIBO d.d.
    3 P-T
    3 R
    3 V
    3 Z
    3D STUDIO LEON
    3K d.o.o.
    3M DOO
    3T.CABLE d.o.o.
    312 ARHIT. RADIONICA
    32 BITA d.o.o.
    36 d.o.o.
    4 - MATE D.O.O.
    4 D
    4 IPO SOBE
    40-BOX
    5 F
    5. KRUNA
    5 M
    5 M d.o.o.
    5DO12 d.o.o.
    5DO12 d.o.o.
    5V-LAB
    7 INVENT
    128 rows returned in 0.01 seconds

Maybe you are looking for