Hibernet query returns null for XMLTYPE data when I use oracle type4 driver

Hi,
I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
Thanks in advance.
regards,
Amaresh

Hi,
I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
Thanks in advance.
regards,
Amaresh

Similar Messages

  • Getnode returned null for uri error for caldav server

    Hello,
    I am trying to install the Oracle UCS ( SUN 7 update 2 ) server.
    https://wikis.oracle.com/display/CommSuite7U2/Communications+Suite+on+a+Single+Host+%28Linux%29#CommunicationsSuiteonaSingleHost%28Linux%29-InstallingtheExample
    So far, I have successfully:
    Checked the installation requirements
    Installed Communications Suite 7 Update 2 Software
    Installed and Configured the Directory Server
    Prepared the Directory under ( Configuring Communications Suite Components )
    Configured Delegated Administrator and Communications CLI
    Configured Messaging Server
    Configured MYSQL Server
    Configured Calendar Server
    I have just installed a caldav server. I checked that it was enabled by running:
    # asadmin list-components -p <admin-port> --type=web
    davserver <web-module>
    Command list-components executed successfully.
    # asadmin show-component-status -p <admin-port> davserver
    Status of davserver is enabled.
    Command show-component-status executed successfully.
    that was from this page:
    https://wikis.oracle.com/display/CommSuite7RR92909/Calendar+Server+7+Troubleshooting
    In Firefox, I try to hit the suggested pages under "Testing Calendar accounts". However, this errors out every time for me.
    http://domain.com/davserver/dav/h/myDomain.com/myusername/calendar
    wheremyDdomain.com is my actual domain that I will not list here
    and myUsername is my actual username which I will not list here
    ( I edited both of these in the logs below )
    I checked my log in /var/opt/sun/comms/davserver/logs:
    INFO [2012-02-11T11:46:02.729-0500] <...DavServer.<init>> Server Startup succeeded
    INFO [2012-02-11T11:46:02.730-0500] <...DavServer.loadBackend> Loading backend defaultbackend with backendid defaultbackend
    INFO [2012-02-11T11:46:02.730-0500] <...DavServer.loadBackend>      JDBC JNDI Name = jdbc/defaultbackend
    INFO [2012-02-11T11:46:09.033-0500] <...DavServer.loadBackend> Loading backend ischedulebackend with backendid ischedulebackend
    INFO [2012-02-11T11:46:09.033-0500] <...DavServer.loadBackend>      JDBC JNDI Name = jdbc/ischedulebackend
    INFO [2012-02-11T11:46:09.427-0500] <...DavServer.loadBackends> iSchedule enabled
    INFO [2012-02-11T11:46:09.439-0500] <...DavServer.loadBackends> modified ischedule collection at /ischedule/
    INFO [2012-02-11T13:33:18.967-0500] <...URIInfoManagerImpl.getEntryFromSearchFilter> found 0 corresponding to: (uid=caldav)
    INFO [2012-02-11T13:33:59.844-0500] <...URIInfoManagerImpl.getEntryFromSearchFilter> found 0 corresponding to: (uid=caldav)
    FINE [2012-02-11T13:42:39.157-0500] <...DavServerServlet.service> [REQ] GET /davserver/browse/h/myDomainName/myUserName/calendar 127.0.0.1 myDomainName
    FINE [2012-02-11T13:42:39.808-0500] <...LDAPSingleHostPool.getConnection> got connection from getConnection() for pool Pool number:0. Host=myDomainName
    FINE [2012-02-11T13:42:41.441-0500] <...LDAPSingleHostPool.getConnection> got connection from getConnection() for pool Pool number:0. Host=myDomainName
    FINE [2012-02-11T13:42:41.460-0500] <...LoginModuleHelper.checkIfUserInAdminGroup> user: admin; isMemberOf = cn=Service Administrators, ou=Groups, o=isp
    FINE [2012-02-11T13:42:41.684-0500] <...DavBrowserServlet.service> Got a non standard condition: getNode returned null for uri /davserver/browse/h/myDomainName/myUserName/calendar
    FINE [2012-02-11T13:42:41.684-0500] <...DavServerServlet.service> [RES] [404] Command execution time: 2.527 secs
    I can hit this page from the browser:
    http://myDomainName:4848
    From my understanding, that is the admin port. That brings up the GlassFish server admin page.
    I do not remember creating a calendar account anywhere is my first thought. I followed the example deployment step by step so far and nowhere does it have me create a calendar user account. So, maybe there is no account at this point?
    So, my first question would be:
    How can I verify that I have a calendar account to begin with? ( or is this what I am doing by trying to log into the sites suggested under 'Test Calendar Accounts').
    My next question would be:
    What does this error mean: "getnode returned null for uri error for caldav server"?
    Spin off question from that:
    What should I do to fix that error?
    Thanks in advance!

    I did not put a slash at the end of the uris I was testing
    http://myDomain.com:80/davserver/browse/h/myDomain/myUserName/calendar
    http://myDomain.com:80/davserver/dav/h/myDomain/myUserName/calendar
    Once I put the slash at the end of the uri, the configuration page appeared and the error was not displayed about getNode anymore:
    http://myDomain.com:80/davserver/browse/h/myDomain/myUserName/calendar/
    http://myDomain.com:80/davserver/dav/h/myDomain/myUserName/calendar/

  • When will you make an IPad YouTube app. There is one for iPhone and when you use it for the iPad the quality is bad since you have to zoom in. Please fix

    When will you make an IPad YouTube app. There is one for iPhone and when you use it for the iPad the quality is bad since you have to zoom in. Please fix

    If you lost sounds for keyboard clicks, games or other apps, email notifications and other notifications, system sounds may have been muted.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the control center if you are running iOS 7. Swipe up from the bottom of the screen to get to control center . Tap on the bell icon and system sounds will return.
    If you are running iOS 5 or iOS 6, the system sound control is in the task bar at the bottom. Double tap the home button and swipe all the way to the right in the task bar to get to the speaker icon on the left side. Tap on that and the sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock can be accessed in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • Acrord32(acrobat reader) loads up for no reason when i use firefox 4.

    (4-15-11)
    i just started using firefox 4(new release) two days ago, i noticed it started to hang and freeze up, so i open up my windows task manager and saw that 2 files was running "AcroRd32.exe"(acrobat reader) , i'm using the most updated version of adobe, the older version of firefox "3.6.16" did not do this. The question is how do i stop "AcroRd32.exe" from starting up for no reason when i use firefox ?. i do not go to sites that have PDF's in them

    IE uses a different version of Flash (ActiveX) than other browsers use (Plugin version), you need to install the correct version of Flash for Firefox.

  • Sharing iPad2:  how to protect my own data when others use it?

    A single iPad2 is shared with others.  How do we protect individual data when others use the iPad?

    I use iCab and Comcast email with no problems. Try restarting your iPad. Try quitting iCab, restart the iPad and then try again. Just keep fighting the loop and see if you can ultimately get it to work if you have to.
    Try using the Connect Lite version of the Xfinity/Comast mail on the iPad. You will have to change that in the preferences on the server. It is in the general section. You want to select Xfinity Connect Lite. I have Comcst and I think this makes it a little easier to navigate and its a little more iPad friendly.
    If you want to be able to write mail in the Comcast webmail on the iPad you have to change to use Plain Text instead of HTML in the Composing preference. If you don't, the keyboard will not popup when you tap in the text field. You will be able to enter the email address in the To: field and the subject in the subject line but that is all unless you switch to plain text.
    I actually prefer the mail app on the iPad to using the Comcast webmail but that's just my preference.

  • I have iPhone 4 but its very slow when i wright message or search for name finally when i use the keyboard its coming very slow

    i have iPhone 4 but its very slow when i wright message or search for name finally when i use the keyboard its coming very slow

    Try Settings > General > Reset > Reset All Settings.

  • Problem with getting current date and time using oracle.jbo.domain.Date

    I`d like to get current date and time using oracle.jbo.domain.Date method getCurrentDate(), but it always return current date and 12:00:00. I also need to get the current time.

    I think you should use java.sql.Timestamp domain.
    (And set database type to TIME or DATETIME.)
    Jan

  • I'm looking for customer references who are using Oracle IFS or OCM

    Dear All,
    I'm looking for customer references who are using Oracle IFS or OCM or Oracle Files for their document management systems. So, if anyone can support me i appreciate.

    We have implemented a document management system using Oracle 9iFS 9.0.2
    I would be happy to let you know of our experiences to date.
    Niels Montanana
    Technology Director
    Practical Law Company
    London, England

  • My final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help

    my final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help me.  I have a 13 inch mac book pro 10.6.8 8gb 2.3 gfz intel core i5

    What did Apple tell you about what they did (or did not) find here?
    See if working on the main disk is any faster.
    USB2 is glacial, as I/O interconnects go.  And USB2 disks have been known to fail, or sometimes to drop back to USB1 speeds, too.  FireWire 800 is substantially faster than USB2, but still not as fast as the internal drive connections can provide.
    Put another way, start varying your configuration, and see which configuration changes (still) have the problem, and which don't.

  • Query return null

    Hi!
    I use Kodo 3.0 + Weblogic 7.4 + MySQL.
    I followed the tutorial, and deployed a session bean to query the database.
    The connection was OK, but the result returned null.
    Did I miss something?
    Here is the server log:
    ====
    CategorySessionBean : Contruct CategorySessionBean
    CategorySessionBean : getCategoryList :
    [INFO] JDBC - -Using dictionary class "kodo.jdbc.sql.MySQLDictionary" (MySQL
    4.0.14-nt ,MySQL-AB JDBC Driver 3.0.8-stable ( $Date: 2003/05/19 00:57:19 $,
    $Revision: 1.27.2.18 $ )).
    CategorySessionBean : Extent : kodo.jdbc.runtime.JDBCExtent@3a0946
    ====
    Here is the test log:
    ====
    -- Initializing bean access.
    -- Succeeded initializing bean access through Home interface.
    -- Execution time: 5484 ms.
    -- Calling create()
    -- Succeeded: create()
    -- Execution time: 141 ms.
    -- Return value from create():
    [email protected]23756.
    -- Calling getCategoryList()
    -- Succeeded: getCategoryList()
    -- Execution time: 1000 ms.
    -- Return value from getCategoryList(): [].
    ====
    The query code is:
    ====
    pm = connectionFactory.getPersistenceManager();
    Extent categoryExtent = pm.getExtent(Category.class, true);
    out("Extent : " + categoryExtent.toString());
    for (Iterator i = categoryExtent.iterator (); i.hasNext ();)
    categoryList.add((Category) i.next());
    categoryExtent.closeAll ();
    ====
    The connection code is:
    ====
    Properties properties = new Properties();
    properties.put("kodo.LicenseKey","*****");
    properties.put("javax.jdo.PersistenceManagerFactoryClass",
    "kodo.jdbc.runtime.JDBCPersistenceManagerFactory");
    properties.put("javax.jdo.option.ConnectionDriverName",
    "com.mysql.jdbc.Driver");
    properties.put("javax.jdo.option.ConnectionURL",
    "jdbc:mysql://localhost/nccudb");
    properties.put("javax.jdo.option.ConnectionUserName", "root");
    properties.put("javax.jdo.option.ConnectionPassword", "****");
    properties.put("javax.jdo.option.Optimistic","true");
    properties.put("javax.jdo.option.RetainValues","true");
    properties.put("javax.jdo.option.NontransactionalRead","true");
    connectionFactory = JDOHelper.getPersistenceManagerFactory(properties);
    ====
    The JDO metadata is:
    ====
    <jdo>
    <package name="nccu.petstore.jdo">
    <class name="Category" objectid-class="CategoryId">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="category"/>
    </extension>
    <field name="catid" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="catid"/>
    </extension>
    </field>
    <field name="descn">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="descn"/>
    </extension>
    </field>
    <field name="image">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="image"/>
    </extension>
    </field>
    <field name="name">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column" value="name"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    ====
    Any help is appreciated,
    Ceilo Huang.

    Can you see if the iterator is returning anything in your bean? You
    should also try setting the SQL logging channel to TRACE (see the
    Logging section of our docs) to see if the SQL generated is valid.
    Ceilo Huang wrote:
    Hi!
    I use Kodo 3.0 + Weblogic 7.4 + MySQL.
    I followed the tutorial, and deployed a session bean to query the database.
    The connection was OK, but the result returned null.
    Did I miss something?
    Here is the server log:
    ====
    CategorySessionBean : Contruct CategorySessionBean
    CategorySessionBean : getCategoryList :
    [INFO] JDBC - -Using dictionary class "kodo.jdbc.sql.MySQLDictionary" (MySQL
    4.0.14-nt ,MySQL-AB JDBC Driver 3.0.8-stable ( $Date: 2003/05/19 00:57:19 $,
    $Revision: 1.27.2.18 $ )).
    CategorySessionBean : Extent : kodo.jdbc.runtime.JDBCExtent@3a0946
    ====
    Here is the test log:
    ====
    -- Initializing bean access.
    -- Succeeded initializing bean access through Home interface.
    -- Execution time: 5484 ms.
    -- Calling create()
    -- Succeeded: create()
    -- Execution time: 141 ms.
    -- Return value from create():
    [email protected]23756.
    -- Calling getCategoryList()
    -- Succeeded: getCategoryList()
    -- Execution time: 1000 ms.
    -- Return value from getCategoryList(): [].
    ====
    The query code is:
    ====
    pm = connectionFactory.getPersistenceManager();
    Extent categoryExtent = pm.getExtent(Category.class, true);
    out("Extent : " + categoryExtent.toString());
    for (Iterator i = categoryExtent.iterator (); i.hasNext ();)
    categoryList.add((Category) i.next());
    categoryExtent.closeAll ();
    ====
    The connection code is:
    ====
    Properties properties = new Properties();
    properties.put("kodo.LicenseKey","*****");
    properties.put("javax.jdo.PersistenceManagerFactoryClass",
    "kodo.jdbc.runtime.JDBCPersistenceManagerFactory");
    properties.put("javax.jdo.option.ConnectionDriverName",
    "com.mysql.jdbc.Driver");
    properties.put("javax.jdo.option.ConnectionURL",
    "jdbc:mysql://localhost/nccudb");
    properties.put("javax.jdo.option.ConnectionUserName", "root");
    properties.put("javax.jdo.option.ConnectionPassword", "****");
    properties.put("javax.jdo.option.Optimistic","true");
    properties.put("javax.jdo.option.RetainValues","true");
    properties.put("javax.jdo.option.NontransactionalRead","true");
    connectionFactory = JDOHelper.getPersistenceManagerFactory(properties);
    ====
    The JDO metadata is:
    ====
    <jdo>
    <package name="nccu.petstore.jdo">
    <class name="Category" objectid-class="CategoryId">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="category"/>
    </extension>
    <field name="catid" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="catid"/>
    </extension>
    </field>
    <field name="descn">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="descn"/>
    </extension>
    </field>
    <field name="image">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="image"/>
    </extension>
    </field>
    <field name="name">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column" value="name"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    ====
    Any help is appreciated,
    Ceilo Huang.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Not right data when row_number used in inner-view sql query...

    Hi ,
    I use the below sql statement which displays the right data
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over(partition by code_farmakou order by sum_posotita desc) from
      (SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS)The data are:
    CODE_FARMAKOU                            EMP_NAME                                                                         PACKTYPE                     PACKSIZE                  SUM_POSOTITA ROW_NUMBER()OVER(PARTITIONBYCO
    0000002419                               FACTREL INJECTION                                                                VIAL                         2 ML                                 5                              1
    0000014071                               DOPAMINE HYDROCHLORIDE                                                           VIAL                         5 ML X 25                           30                              1
    0000086289                               DETUSSIN EXPECTORANT                                                             BOT                          120 ML                               3                              1
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        2                              1
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        1                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                       45                              1
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1                              3
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              6                              1
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              2                              2
    1000016655                               KABIVEN                                                                          BT                           50ÖÕÓ.×1,7ML                        21                              1
    1000016655                               KABIVEN                                                                          BT                           50ÖÕÓ.×1,7ML                         2                              2However , when i use the below statement , in order not to display the row_number (so i use row_number function in inner-view) the data are different--in different order... why is that????
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA from
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over(partition by code_farmakou order by sum_posotita desc) from
      (SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS)
      )and its data are:
    CODE_FARMAKOU                            EMP_NAME                                                                         PACKTYPE                     PACKSIZE                  SUM_POSOTITA
    1000016655                               KABIVEN                                                                          BT                           50ΦΥΣ.Χ1,7ML                        21
    1000016655                               KABIVEN                                                                          BT                           50ΦΥΣ.Χ1,7ML                         2
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        2
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                       45
    0000014071                               DOPAMINE HYDROCHLORIDE                                                           VIAL                         5 ML X 25                           30
    0000086289                               DETUSSIN EXPECTORANT                                                             BOT                          120 ML                               3
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              6
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1
    0000002419                               FACTREL INJECTION                                                                VIAL                         2 ML                                 5
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        1NOTE :Sorry, I tried to pose some sample data using the "with" statement but i couldn't...the error ORA-32035 : unreferenced query name defined in WITH clause was displayed..
    Regards,
    Simon

    The optimizer has, well, optimized out the row_number because you never refer to its value in the outermost query.
    sql>select deptno, cnt, row_number() over (order by cnt desc) rn
      2    from (select deptno, count(*) cnt
      3            from emp
      4           group by deptno);
       DEPTNO       CNT        RN
           30         6         1
           20         5         2
           10         3         3
    3 rows selected.
    -- here because we include rn in the outermost query,
    -- the results are still ordered based on the analytical function result
    sql>select deptno, cnt, rn
      2    from (select deptno, cnt, row_number() over (order by cnt desc) rn
      3            from (select deptno, count(*) cnt
      4                    from emp
      5                   group by deptno));
       DEPTNO       CNT        RN
           30         6         1
           20         5         2
           10         3         3
    3 rows selected.
    -- but if we don't include rn in the outermost query,
    -- the optimizer leaves out the window sort and the results are in a different order
    sql>select deptno, cnt
      2    from (select deptno, cnt, row_number() over (order by cnt desc) rn
      3            from (select deptno, count(*) cnt
      4                    from emp
      5                   group by deptno));
       DEPTNO       CNT
           10         3
           20         5
           30         6
    3 rows selected.This just reinforces the point that if you want your results in a particular order, you need to provide an ORDER BY clause - don't rely on execution plans to do your sorting for you.

  • Query returning summary for master categories

    Dear all,
    i am using oracle database 11g r2.
    i have the following 2 tables,
    create tabel expenses_heads (exp_head_id number primary key,
                                                 Main_exp_name varchar2(100) not null,
                                                 refer_exp_head_id number);
    alter table expenses_heads add constraint fk_refer_head_id foreign key(refer_exp_id) references expenses_heads(exp_head_id);
    create table expenses (exp_id number primary key,
                                       exp_head_id number references  expenses_heads(exp_head_id) not null,
                                       exp_name varchar2(100) not null,
                                       exp_date date not null,
                                       exp_amount number not null,
                                       receipt varchar2(20),
                                       remarks varchar2(4000));
    i have the following data,
    insert into expenses_heads values(1,'School',null);
       insert into expenses_heads values(2,'College',null);
    insert into expenses_heads values(3,'Bills',1);
    insert into expenses_heads values(4,'Hardware',1);
      insert into expenses_heads values(5,'Food',1);
    insert into expenses_heads values(6,'Dress',1);
    insert into expenses_heads values(7,'Hardware',1);
      insert into expenses_heads values(8,'Admission',2);
       insert into expenses_heads values(9,'Office',2);
    insert into expenses values(1,3,'Electricity Bill',sysdate,1000,null,null);
    insert into expenses values(2,3,'Water Bill',sysdate,100,null,null);
    insert into expenses values(3,4,'Chair',sysdate,1000,null,null);
      insert into expenses values(4,4,'Tables',sysdate,200,null,null);
      insert into expenses values(5,8,'Admin Ceremony',sysdate,3000,null,null);
        insert into expenses values(6,9,'Stationary',sysdate,2000,null,null);
    commit;
    now i want to write a query which have tow columns summary, Main_exp_name(from expenses_heads) and Total_amount(from expenses)
    result should look like below
    Main_exp_name                         Total_Amount
    College                                        2300
    university                                     5000
    i think it could be written by using group by and rollup or cube or grouping sets, but confused.
    kindly help.

        select refer_exp_id, 
          exp_head_id, 
          prior main_exp_name main_exp_name 
        from expenses_heads 
          connect by refer_exp_id = prior exp_head_id 
      h 
    This is a Hierarchical Query to build the Hierarchy of your Expenses_Head Table. i.e. It will return you the Expenses Heads with its Parent Expense Details.
    expenses e
    join
       select refer_exp_id,
       exp_head_id,   
       prior main_exp_name main_exp_name
       from expenses_heads
       connect by refer_exp_id = prior exp_head_id
    ) h
    on
    ( e.exp_head_id = h.exp_head_id )
    You then Join this data with your Expenses table based on EXP_HEAD_ID.
    select h.main_exp_name, sum (exp_amount) exp_amount
    group by h.main_exp_name;
    Group the data based on your Parent Expense i.e. MAIN_EXP_NAME, fetched from the Hierarchical Query.
    To format the code, use Advanced Editor (You will find it at Right Top of your Usual editor, if replying to a post or by default the editor is Advanced Editor if starting a Discussion). Once in Advanced Editor, Click on >> and upon Mouse over on Syntax Highlighting option, you will get a menu and select SQL from it.
    I hope it clears your questions.

  • CAML Query returning all items with date condition

    HI,
    I have a problem doing a query with CAML over the elements of a calendar in SharePoint 2013
    I just want to retrieve all items, which have been modified on a particular date. But below query returns all items from the Calendar.
    Any suggestion how to get specific items from the calendar. The same issue exists for start date  and end date.
      var oWebsite = clientContext.get_web();
        this.collList = oWebsite.get_lists();
        var camlQuery1 = new SP.CamlQuery();
       camlQuery1.set_viewXml(
       '<query><Where>'+
          '<Eq>'+
             '<FieldRef Name=\'Modified\'  IncludeTimeValue=\'TRUE\'/>' +
             '<Value Type=\'DateTime\'>2014-02-24T12:00:00Z</Value>'+
          '</Eq>'+
       '</Where></query>');
        this.collListItem1 = oList.getItems(camlQuery1);
        clientContext.load(collListItem1);

    Firstly try to make this change in your query and see if that helps
    camlQuery1.set_viewXml(
    '<View><Query><Where>'+
    '<Eq>'+
    '<FieldRef Name=\'Modified\' IncludeTimeValue=\'TRUE\'/>' +
    '<Value Type=\'DateTime\'>2014-02-24T12:00:00Z</Value>'+
    '</Eq>'+
    '</Where></Query></View>');
    Geetanjali Arora | My blogs |

  • Query returns null pointer as result

    Hi,
    I have a problem retrieving objects with Query. Wenn I lookup an object
    with the following method:
    Query q = pm.newQuery(classObj);
    q.declareParameters("String param");
    q.setFilter(fieldName + " == param");
    ans = (Collection)q.execute(searchValue);
    if (ans.isEmpty())
    return null;
                   Iterator i = ans.iterator();
                   if (i.hasNext())
                        Object obj = i.next();
                        q.close(ans);
                        return obj;
                   throw new IllegalArgumentException("No object with code: '" +
    searchValue + "'");
              catch (Exception e)
                   if (ans != null)
                        q.close(ans);
                   throw e;

    Hi Martin,
    before this problem started to, I have changed the MappingFactory from
    "db" to "file" and then back. I also deleted the jdo_mapping table
    inbetween and reconsturcted it with the mapping tool. From then on, it
    would not find the object anymore. The object that I wanted to get at is
    in the database and an empty object is constructed, which I knew from
    putting a breakpoint in the constructor.
    Because I am not in production yet, I could just delete the database and
    start from scratch. Which cured the problem, but as soon as we will be
    online, that is not an option anymore, I guess.
    Let me know, if you need more help to reproduce this problem.
    Best regards
    Wolfgang

  • ITunes 5 looks for movie data when updating iPod...

    I'm experiencing a very annoying problem in iTunes 5. When I plug in my iPod (4G) the songs are updated as they should, but then a message pops up saying something like this:
    "Searching for movie data in movie archive "the name of the archive"
    Then it says:
    "The archive couldn't be found. Movie can't be played without the right archive"
    And then you'll have to click "search" or "cancel". That is very annoying.
    Why is iTunes suddenly searching for movies to play, when I'm updating my iPod?
    How can I make it stop?

    Reading this file may help
    http://docs.info.apple.com/article.html?artnum=301691
    M

Maybe you are looking for