How to query in java for Oracle 10gr2 XMLDB

Hi,
I�ve some problems.
I�ve some search queries which are working on normal relation table, but I don�t know how it works on XMLDB(Oracle 10gR2)
Structure of XML file
My xml table structure will be :
Create table <tablename>
Person_Id number primary key,
Person_BankName varchar2,
DateOfEntry date,
Xmlcol xmltype
Xmlcol xmltype will be mapped to a schema for the below xml file.
XML File
<Person>
     <Information>
          <firstname>Suchendra</firstname>
          <lastname>Kumar</lastname>
          <middlename>Krishna</middlename>
     </Information>
     <Account>
          <accountno>12212</accountno>
          <balance>42323.89</balance>
          <opendate>12-03-2005</opendate>
     </Account>
     <Transaction>
          <transamount>1000</transamount>
          <balance>41323.89</balance>
          <trandate>14-03-2005</ trandate >
          <trantime>10:40:22</trantime>
     </ Transaction >
</Person>
SQL Queries Required
1.     Query to fetch the records whose transaction has been done from date 12-03-2001 to date 01-01-2005.
2.     Query to fetch the records whose lastname= �*Kumar�
3.     Query to fetch the records whose transaction has been done from time 9:09:55 to time12:26:23.
4.     Query to fetch the records whose balance > 4000 and balance < 5000.
5.     Regular expression Search in XMLDB. Ex: searching for records whose firstname has �su*� or �*ab� in it.
How to extract these result set values in java for XMLDB (JDBC)?
How to fetch these values from the result set?
Whether Prepared Statement, Execute Query are compatible in XMLDB
Can anyone help me in this..
Thanks
Athar

Athar,
You have been busy! You posted this same question to the SQL forum and the XMLDB forum. I see you got some answers regarding the XML part, so I will try to help you with the JDBC part. Have a look at this example:
http://tinyurl.com/oemd7
Good Luck,
Avi.

Similar Messages

  • Create Table query in java for oracle

    hi all,
    i am working on a project in which i have to create table runtime, i want that if table already created it dont create.
    Regards

    There is a forum for JDBC related questions. This is not that forum. Also you may have noticed that there is no forum called "General Oracle PSQL questions here" amongst these forums as well and that might be something you wish to reflect upon.

  • How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

    I created a virtual machine on vmware workstation 6 and installed OEL4.
    during first install I created 20 GB disk but now I want to add more disks.
    from vmware documentation I tried to add more 8 gb disk to the virtual host.
    under devices I see two lines;
    Hard Disk (SCSI 0:0) 20.0 GB
    Hard Disk (SCSI 0:2) 8.0 GB
    but I must be missing some step since I can not see 20 + 8 gb at df;
    [root@antuhost ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1              13G  9.7G  2.3G  82% /
    none                  506M     0  506M   0% /dev/shm
    /dev/sda2             4.9G  851M  3.8G  19% /homeThank you.

    Oh the check the answer from Re: How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

  • How to query opening balance for all customer or Vendor for an speci. date

    Hi,
    How to query opening balance for all customer or Vendor for an specific date?
    Example:
    put any date and query will show all customer/ Vendor  that date opening/current balance.
    Regards,
    Mizan

    Hi mizan700 ,
    Try this
    SELECT T0.[DocNum] As 'Doc No.', T0.[CardCode] As 'Customer Code',
    T0.[CardName] As 'Customer Name',(T0.[DocTotal]-T0.[PaidSys]) As 'O/S Balance'
    FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    INNER JOIN OCRG T2 on T1.GroupCode = T2.GroupCode
    INNER JOIN INV1 T3 ON T0.DocEntry = T3.DocEntry
    WHERE T0.[DocStatus] ='O'
    AND
    (T0.[DocDate] >='[%0]' AND T0.[DocDate] <='[%1]')
    Regards:
    Balaji.S

  • How Do I Get Java For Mac OSX 10.5.8 On A PowerBook G4 Or Update To Minimum MAC OSX 10.6.8 or later Without Spending Any Tech Mind Of My Own And Also Not Buy ANYTHING AT ALL!!!?????

    How Do I Get Java For Mac OSX 10.5.8 On A PowerBook G4 Or Update To Minimum MAC OSX 10.6.8 or later Without Spending Any Tech Mind Of My Own And Also Not Buy ANYTHING AT ALL!!!????? Please Help!!!

    Sorry, it's for 64 bit IntelMacs only...
    updating Java SE 6 to 1.6.0_26 for 64-bit capable Intel-based Macs. 
    Java for Mac OS X 10.5 Update 10

  • How do I update Java for Adobe Flash CS3?

    Hi,
    When I ran Secunia Software Inspector today it told me that
    the version of Java I have installed on my computer is out of date.
    It tells me that it is finding 3 out-of-date files:
    Once here:
    C:\Program Files\Java\jre1.6.0_04\bin\java.exe
    Twice here:
    C:\Windows\System32\java.exe
    and three times here:
    C:\Program Files\Adobe\Adobe Flash CS3\JVM\bin\java.exe
    I updated Java via the Sun website and consequently the first
    and second warnings disappeared when I reran the Software
    Inspector.
    The software inspector however is still finding an
    out-of-date Java version here:
    C:\Program Files\Adobe\Adobe Flash CS3\JVM\bin\java.exe
    Question is: How do I update Java for Adobe Flash CS3?
    Is it adequate to copy the updated file "java.exe" from
    "C:\Program Files\Java\jre1.6.0_04\bin\" to "C:\Program
    Files\Adobe\Adobe Flash CS3\JVM\bin\" or do I need to do anything
    else?
    Any help will be much appreciated.

    Hi
    I have the same problem of you, and the same dont find a
    solution. Me it's Kaspersky Anti Virus (AV) which find this
    problem.
    So (and I dont know if this solution is perfect), but I open
    Flash CS3 with the Java update choiced and apparently Flash
    fonctionnely well and Kaspersky dont find this
    prob now. But I dont never use Java in Flash (or without that
    I know that..), and same, I dont know at what Java is used in Flash
    I think that "JRE v 1.6.0_04" and more recent Java version is
    not good, because it's not quite the same Java application that in
    Flash CS3, In Flash CS3 it's "J2RE" and
    not "JRE".
    The history of all Java versions (and this) is here (
    http://java.sun.com/products/archive/)
    (but in all this versions... seriousely it's a true shambles !)
    If you want the last version for J2RE in this archives it's v
    1.4.2.18 but the last version is J2RE 1.4.2.19 but dont again in
    this archives
    (search on Java site, maybe first page ? I dont remember
    where I to find it...). But the problem... it's that this last
    version (19) is always detected bad by my AV...
    So I decide to use just the next version (v 1.5) and last
    version in this series (in archives site) which is the "JDK/JRE -
    5.0 v 5.0.16" but again named "Java 2 Platform
    Standard Edition (J2SE) 5.0 Update 16" in this dowload next
    archives page
    http://java.sun.com/products/archive/j2se/5.0_16/index.html),
    so well again named "Java 2" in this page (that which dont
    the case for the equivalent same download page for Java 6...)
    (Choice "JRE 5.0 Update 16" in this page)
    For instal "JRE 5.0 Update 16":
    1) Supp all files and folders in "JVM" (Java Virtual Machine)
    folder in Flash CS3 (but dont supp this folder, empty now) and save
    this contents in archive in you have
    affraid.
    2) dl "JRE 5.0 Update 16", directly in this page if you want:
    (https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/View ProductDetail-Start?ProductRef=jre-1.5.0_16-oth-JPR@CDS-CDS_Dev
    eloper)
    3) In install, choice "personal instal" (or +/- the same
    terms) and choice the "JVM" folder of you Flash CS3
    and AV dont detect this version same a bad file

  • HT1338 how do i update java for my computer

    how do i update java for my computer

    Welcome to the Apple Support Communities
    To install the most recent Java version for Mac OS X Snow Leopard, open  > Software Update. If it tells you that you are running the most recent version, you are using the most recent Java version for Snow Leopard

  • HT5055 How do I get Java for OS X Lion 2012-003

    How do I get Java for OS X Lion 2012-003?

    You can download and install from the following website:
        http://www.macupdate.com/app/mac/39490/apple-java-for-os-x-lion
    Hope this helps

  • How to configure SNMP agent for Oracle 10g

    Hello,
    I've installed oracle 10g in a Windows 2000 SP4 and I want to monitor database using SNMP.
    I've already installed Windows SNMP agent but I haven't any idea how to configure Oracle in order to grant SNMP monitoring.
    What should I do?
    Is Oracle database ready to be monitored via SNMP by default?
    Thanks in advance for your help.
    Regards,
    Carles

    Hello,
    Thanks for your message.
    In fact, I already found this doc in oracle, but it just show executables I have to install and my question can I install these executables.
    I've already installed Windows SNMP agent, configured and testedwith disk space checkings, but it doesn't work fine with Oracle.
    I launched Oracle Universal Installer and I checked Installed Products, but I haven't found how to install SNMP agents for oracle.
    How can I add Oracle Peer Master Agent and Encapsulator to my oracle installation?
    Thanks again for your help.
    Regards,
    Carles

  • XML Developer's Kit for Java for Oracle 8i

    Hello,
    I want to download XML Developer's Kit for Java for Oracle 8i but I find only for Oracle 9i in the download site. I previously had download this for Oracle 8i. So I guess it should have moved to some other place and I am just not able to find it.
    Can anyone let me know where I can download the XDK kit for Java for Oracle 8i?
    Thanks.
    Rama.

    According to the license:
    "We grant you a nonexclusive, nontransferable limited license to use the programs for purposes of developing your applications. You may also distribute the programs with your applications to your customers...."
    But you may not:
    "distribute the programs unless accompanied with your applications;
    For more information, please refer to the following page:
    http://otn.oracle.com/tech/xml/xdk/doc/production10g/license.html

  • How do i download java for my imac 10.6

    how do i download java for imac 10.6

    Look in the Applications folder or in the Utilities folder (which is in the Applications folder) for an item named Java Preferences. If it is there, open it. You should then be asked permission for it to be downloaded and installed - okay that.

  • Oracel 10gR2 XMLDB -- how to query in Java

    I’ve some problems.
    I’ve some search queries which are working on normal relation table, but I don’t know how it works on XMLDB (Oracle 10gR2)
    Structure of XML file
    My xml table structure will be :
    Create table <tablename>
    Person_Id number primary key,
    Person_BankName varchar2,
    DateOfEntry date,
    Xmlcol xmltype
    Xmlcol xmltype will be mapped to a schema for the below xml file.
    XML File
    <Person>
         <Information>
              <firstname>Suchendra</firstname>
              <lastname>Kumar</lastname>
              <middlename>Krishna</middlename>
         </Information>
         <Account>
              <accountno>12212</accountno>
              <balance>42323.89</balance>
              <opendate>12-03-2005</opendate>
         </Account>
         <Transaction>
              <transamount>1000</transamount>
              <balance>41323.89</balance>
              <trandate>14-03-2005</ trandate >
              <trantime>10:40:22</trantime>
         </ Transaction >
    </Person>
    SQL Queries Required
    1.     Query to fetch the records whose transaction has been done from date 12-03-2001 to date 01-01-2005.
    2.     Query to fetch the records whose lastname=”Kumar”
    3.     Query to fetch the records whose transaction has been done from time 9:09:55 to time12:26:23.
    4.     Query to fetch the records whose balance > 4000 and balance < 5000.
    5.     Regular expression Search in XMLDB. Ex: searching for records whose firstname has ‘su*’ in it.
    How to extract these result set values in java for XMLDB (JDBC)?
    How to fetch these values from the result set?
    Whether Prepared Statement, Execute Query are compatible in XMLDB
    Can anyone help me in this..
    Thanks in advance
    Athar

    Athar,
    You have been busy! You posted this same question to the SQL forum and the XMLDB forum. I see you got some answers regarding the XML part, so I will try to help you with the JDBC part. Have a look at this example:
    http://tinyurl.com/oemd7
    Good Luck,
    Avi.

  • How to setup JNDI Name for Oracle Apps adapter?

    Hello,
    I am learning Oracle SOA 11g and trying to do some tutorial on Oracle Application Adapter.  I know how to configure JNDI for DBadapter and I did that successfully. I followed same steps to create New JNDI for Oracle Apps Adapter.
    1. I Created new data source using Path Services->Data Sources -> New Genric Data Source. Connection to database was successful and created new JNDI Name: jdbc/PKDTAPPS.
    2. Then Deployment-> OracleApps Adapter-> Configuration-> Outbound Connection Pools -> New and created JNDI Name eis/Apps/PKDTAPPS.
    However I did not find newly created JNDI Name in step 2 under Deployment-> OracleApps Adapter-> Configuration-> Outbound Connection Pools -> javax.resource.cci.ConnectionFactory.
    Please let me know if am I following correct steps to create new Oracle Apps Adapter JNDI Name or not.
    Since above approch did not work I created new JNDI for DBAdapter with same database connection details. And then latter on use that JNDI Name while creating Oracle Application Adapter in JDeveloper composite. And it allowed me to access Oracel Apps open interface. However while deploying the application it gave me following error.
    <Feb 16, 2015 10:50:59 AM CST> <Error> <oracle.integration.platform.blocks.deploy.servlet> <SOA-21537> <Sending back error message: There was an error deploying the composite on AdminServer: [JCABinding]
    [adapter-Apps-101-JournalImport.InsertJournal/1.0]Unable to complete unload due to: Cannot locate Java class oracle.tip.adapter.apps.AppsTableWriteInteractionSpec: Cannot locate Java class
    oracle.tip.adapter.apps.AppsTableWriteInteractionSpec..>
    Since I have no past experience kindly suggest me what is right way to do this.
    Thanks,
    Shri

    Hi shri,
    Can you check the targets of oracle apps adapter that is it deployed on both cluster and admin server both.
    Deployment-> OracleApps Adapter-> Targets
    Regards,
    Anshul

  • Urgent:How to get the Sqltext for Oracle Sumbitted Jobs in 10g

    Dear All,
    Could you help me out in sorting the below problem.
    I use to get the current running sql's with following below query in 9i.
    SELECT A.SID,B.HASH_VALUE, OSUSER, USERNAME, SQL_TEXT
    FROM V$SESSION A, V$SQLTEXT B
    WHERE B.HASH_VALUE = A.SQL_HASH_VALUE
    AND USERNAME LIKE upper('%SCHEMA%')
    ORDER BY B.HASH_VALUE, B.PIECE;
    This is will work in 10g also for user-triggered sqls,stored procedures etc.
    But when oracle submits job i'm not able find which qurery is running.
    Seems For oracle jobs in 10g for V$session contain column SQL_HASH_VALUE as Zero and hence i'm not able find the any sql's running.
    Could you please any of you help me out how to get the Sqltext for Orcle submited Jobs in 10g.
    Please revert asap as this is very urgent for me.
    Thanks in Advance
    Anil.

    Have you tried to query WF_ITEMS? -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_ITEMS&c_owner=APPLSYS&c_type=TABLE
    bde_wf_item.sql - Runtime Data of a Single Workflow Item [ID 187071.1]
    Thanks,
    Hussein

  • How do I enable java for my android mobile.

    I am getting an error "enable java for your browser". how do I do that as I am unable to see the preferences tab anywhere.

    Oracle doe not make the Java plug-in for Android due to Oracle's lawsuit against Google which of course is the developer of Android. Note that Java and JavaScript are two different things in case the message actually said JavaScript which should be enabled.

Maybe you are looking for

  • Leopard, external USB HD, Windows Vista

    I have a G4 laptop running Leopard. After reformatting my external hard drive to MS-DOS FAT 32, it does not appear at all in Windows Vista. What else can I do to fix this problem?

  • BEx Variable Key/Name swap when used as Prompt in WebI report

    Hi, We are using Bex Variables in a Query used as a base for a BOBJ Universe and Query. When refreshing the report the Prompt box displays the Name and Key of the infoobject (Dimension), but when selecting one of those values - moving it to the right

  • Help ne in my project

    hi I am new to j2me... and now doing small projects....please anyone advise me how to send the data stored in the mobile like contact no.s etc...to the mail account/storing some other place...thanks in advance

  • CO-PA Documents

    Dear Friends, I entered 3 products in the S.O. I completed Delivery and Billing.After completion of all those things I found in the documents list system generated 3 documents for profitability analysis. That means it generates each document for each

  • BSoD Windows 7

    Hello everyone. For the past .. over a year now, I've been having BSoD issues. It happens during several things. #1: Recording gameplay using capture card #2: Unplugging said capture card from USB while forgetting to use the "safely remove" option #3