XML queries... Change the code from using Oracle db into MS SQL

Hi, I am a new begginer in this field. I came accross to an article that focuses in Oracle's XSU approach.
Currently, i am trying to convert the java code from using Oracle db to MSSQL db. The code has shown below:
import javax.naming.*;
import javax.sql.*;
import java.sql.*;
import oracle.xml.sql.query.*;
public class testxml
     public static void main(String args[]) throws SQLException, NamingException
     String tabName = "emp";
     int maxRows = 3;
     Context ctx = new InitialContext ();
     DataSource ds = (DataSource) ctx.lookup ("MyOra");
     Connection conn = ds.getConnection ();
OracleXMLQuery qu = new OracleXMLQuery (
conn, "select EMPNO, ENAME from " + tabName);
qu.setMaxRows (maxRows);
qu.setRowsetTag ("EMPLOYERS");
qu.setRowTag ("PERSON");
String xmlString = qu.getXMLString();
System.out.println (xmlString);
conn.close ();
Currently, i am having difficulties to change the "bold" area that uses Oracle into MS SQL as my current application is using MS SQL as the database.
Please help and need more advices from all of you. Thank You

I resolved this issue myself. For the answer please message me.

Similar Messages

  • Changed the variable from used in condition to changed gives error

    Hi,
         How to decide on which fields to be used in charecteristcs and which in used in condition. ?
    I have a code in fox which works for some tets data and fails for ceration other test data. wheni changed one field from used in condition to changed field the code is working. however now when i transport the same to quality it gives the error as   :
    " Variable Material Must Have a Type of a Field to be Changed.
    Kindly Help on this. From where should i changed the type of material ? currently i have just changed the tick of the check box from  " used in condition "  to " changed "
    Thanks And Regards,
    Vijay

    Hi Vijay,
    Please replace the code with the following one.. I think it will work now.. Apparently there is no problem with field to change option. However, please note that you are checking the help option (below fox editor) while providing the sequence for material and Plant. It might happen that system is looking for plant and material option and you are providing as material and plant option.
    Please check the code below:
    DATA CALMONTH TYPE 0FISCPER.
    DATA LO_CURR TYPE 0LOC_CURRCY.
    DATA LO_0CALQUAT TYPE 0CALQUARTER.
    DATA MATERIAL TYPE GPUMATL.
    DATA VENDOR TYPE 0VENDOR.
    DATA LO_VENDOR TYPE 0VENDOR.
    DATA PLANT TYPE GPUPLANT.
    DATA L_SPLIT TYPE F.
    DATA L_VOL TYPE F.
    DATA TOT_VOL TYPE F.
    DATA L_VOLUME TYPE F.
    DATA L_FISCQUAT TYPE GPUFSCQRT.
    BREAK-POINT.
    TOT_VOL = 0.
    *CALCULATE TOTAL VOLUME
    FOREACH MATERIAL, PLANT,VENDOR, LO_CURR,LO_0CALQUAT,L_FISCQUAT .
    L_VOL = {Z9APSHIP,LO_0CALQUAT,LO_CURR,VENDOR,L_FISCQUAT ,MATERIAL,PLANT}.
    TOT_VOL = TOT_VOL + L_VOL .
    *CALCULATE SPLIT % BASED ON TOTAL VOLUME
    L_SPLIT = {GPU_VSPER,LO_0CALQUAT,LO_CURR,VENDOR,L_FISCQUAT ,MATERIAL,PLANT}.
    L_VOLUME = PERP(TOT_VOL,L_SPLIT).
    {Z9APSHIP,LO_0CALQUAT,LO_CURR,VENDOR,L_FISCQUAT ,MATERIAL,PLANT} = L_VOLUME .
    ENDFOR.

  • Possible to change the datasource from a business-view to a Sql Command ?

    Hello,
    When a business view contains a lot of elements it takes a while just to open the report.
    We'd like to keep the BV as the dictionnary, but,
    once the report design completed,
    we'd like to disconnect the business view and replace it by the Sql command which can be seen in the menu option 'show SQL query'.
    Is it possible via the RAS sdk ?
    Did somebody experience this ?
    How to proceed ?
    Thanks a lot
    Alain

    Hi Ted,
    I'm thinking opening a Case for this problem of opening reports based on a big BV.
    We can't really reduce the BV, since it is the dictionnary and we need the whole thing...
    I'm wondering why it is impossible to change the Datasource if the tables and fields underneath are identical.
    Is it impossible to change the fields' mapping ?
    The other solution, as you suggest, is to create a report from scratch, create a new Datasource with the Sql command format, and rebuild the report... I agree it looks like a big job...
    Do you know if it is possible to export the report in XML for instance, change the XML, and then re-import ?
    Thanks for your Help.
    Alain

  • How do I change the examples to use Oracle rather than Cloudscape

    I set up the JDBC connector and can ping my Oracle DB from WebLogic. I know what
    to run the first EJB example using the Entity beans and persisting with the CMP.
    I built a table in Oracle - just don't know the process for talking to Oracle
    rather than to Cloudscape which seems to start automatically with the Examples
    server. I have the JDBC code, but where do I put it? What config files need to
    be modified?
    Thanks!

    rcolbroth wrote:
    Is there anyway of creatiing a different name for this Folder rather than 2013?
    If you are using one of Lightroom's "date-based" folder templates, then the folders are created in accordance with the image capture date, not the date that you happen to import it. If you specifically want to use the import date for your folder names then you probably don't want to use the Lightroom date template, and instead you'll need to setup your folder names manually.
    The vast majority of users that use date-based folder naming schemes will use a standard Lightroom template, i.e. based on the much more meaningful image capture date.

  • When i copy code from DW to BC it change the code inside BC

    Hi
    I'm uploaded a html page to a BC account from Dreamweaver and BC changed some of the code,
    I tryed to open the Site Manager / Pages and the page i uploaded and did a copy & past to get the code inside, but it still changes the code.
    Im trying to get the code <i class="icon-caret-down"></i> in but it change that code to <em class="icon-caret-down"></em>
    Anyone know why this is happening or how i can go about this??
    Best
    Morten Håland - Sitespark

    The editor inside BC is XHTML compliant and will edit things into that format unfortunatly. Try to avoid using it for anything other then content.

  • I had to change my password to get into my iTunes account. I had $11.11 remaining on a card I had. I no longer have that card but it wants the code from the card. Now what?

    I had to change my password to get into my iTunes account. I had $11.11 remaining on a card I had. I no longer have that card but it wants the code from the card. Now what?

    First, please be aware that you are not communicating with Apple when you post in these forums. The only people who will reply to your posts are we your fellow users. iTunes Support will never respond to posts made here.
    As to your issue, confirm with your bank that they do not block access from on-line services or otherwise have restrictions on with whom a card can be used. For some company cards, such blocks can be set up. If you confirm that no such restrictions are in place, post back and we'll go from there.
    Regards.

  • How to change the Portal Password using a link from Web dynpro application

    Hello Everybody,
    I have a requirement to change the user password from a web dynpro application which is available on a mobile device. Firstly User will log into the portal through a mobile device and after getting authenticated user will be redirected to the mobile application. Within this mobile application there will be a link to change the login password(Portal login). Can somebody tell me how can i change the portal login password from a link available within the mobile application. Looking forward for a suitable reply.
    Thanks to all,
    Regards,
    Saby.

    Hi Maksim,
    Thanks for your reply..but i would also like to know can we directly use the Change Password Iview "persoUserPassword" from the portal. Can i directly Pass the URL of this iview from the portal to a "Change Password" link in the web dynpro application, so that when the user click this link he should be able to see this Iview on his/her mobile device and should be able to change the password from there. But i dont know whether this iview will appear properly on the mobile device or we have to have a custom web dynpro application for this purpose...Please reply with a suitable answer.
    Thanks in advance.
    Regards,
    Sarabjeet Singh.

  • I had this video file and I was trying to flip it to a format that would work with iMovie.  It used to have the Quicktime image with it.  So, I assume it was a QT file.  But, somehow I've changed the file from a video to a folder.

    I had a video file and I was trying to flip it to a format that would work with iMovie.  It used to have the Quicktime image with it.  So, I assume it was a QT file.  But, somehow I've changed the file from a video to a folder.  I've tried to undo the action.  No luck.  I wasn't running my Time Machine.  So, I can't go back.  Help.  It's the only copy of this video.

    I've tried to undo the action.
    How?
    Please detail ALL you have done so far in the way of troubleshooting?   Need this info to avoid the been there done that scenarios.
    it's the only copy of this video.
    Where did you get the video from?
    From the pic I noticed that the folder is 841.9mb.  What's inside?  Or what happens when you click on it?

  • HT201365 how do i change the passcode for using my ipad that i created when installing find my iphone. the is different from my apple id and password

    how do i change the passcode for using my ipad which i created when i set up findmyiphone.  this is different from my apple id and password

    On both your devices go to Settings>iCloud, then scroll down and click "Delete Account". You can then sign back in using your updated details.
    Note: "Delete Account" will not delete data from iCloud, it will simply remove the account from your device.

  • Cannot change Tax Code from the referenced sales order line

    hi,
    Has anyone ever got this error when creating Sales Order(SO): "*cannot change Tax Code from the referenced sales order line*"?
    The error occur with order type Return.
    This SO is created by copying from another SO.
    Please help.
    Regards & thanks,
    eRie

    hi,
    Has anyone ever got this error when creating Sales Order(SO): "*cannot change Tax Code from the referenced sales order line*"?
    The error occur with order type Return.
    This SO is created by copying from another SO.
    Please help.
    Regards & thanks,
    eRie

  • How can I change the email from my app store an use a different email forgot password

    How can I change the email from my app store an use another email

    Hi there,
    You may find the article below helpful.
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311
    -Griff W.

  • HT201320 I have two email accounts. However, the iPad automatically uses the account that I only want to use for business. How can I change the account from which mail is sent and received?

    I have two email accounts. However, the iPad automatically uses the account that I only want to use for business. How can I change the account from which mail is sent and received?

    You are most welcome

  • TS3999 How do you Change the sent from email for iCal invitations on my iPad. It uses the iCloud email but I want it to use my work email.

    How do you Change the sent from email for iCal invitations on my iPad. It uses the iCloud email but I want it to use my work email.
    It keeps sending from my bosses ICloud account, we are all synced at work but I want all my invitations to come from me, not my bosses iCloud account!
    Need to know how to do it on the iPad!!

    Hi garretktowne,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    Apple ID: Changing your Apple ID
    http://support.apple.com/kb/HT5621
    Cheers,
    - Judy

  • RE: Typekit...how do I move the code from an old account to my new account under the Creative Cloud?

    RE: Typekit...how do I move the code from an old account to my new account under the Creative Cloud? W/out (preferably) interuption to the website in question? Thanks!

    Hi Jesse,
    Please email us at [email protected] with:
    - your current Typekit account email address
    - the email address you use for Creative Cloud
    We will be able to help you make this change without disrupting your current font serving. 
    Thank you,
    -- liz

  • How to change the datasource from one server to another server?

    i need to change the datasource from development environment to production server. i had configured the JNDI informations like the following in the 'context.xml':
    <Context path="/RFT" docBase="RFT" reloadable="true">
    <Resource
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    validationQuery="select 1"
    name="jdbc/datasource"
    username="sa"
    password="$m1sbag$"
    maxIdle="-1"
    maxActive="0"
    maxWait="5000"
    url="jdbc:microsoft:sqlserver://172.24.151.149:1433;databaseName=Projectgold" />
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    </Context>
    and in 'web.xml' included the following code:
    <resource-ref>
                         <res-ref-name>jdbc/datasource</res-ref-name>
                         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
    </resource-ref>
    and mentioned the JNDI Connection Name in the .rpt file as 'jdbc/datasource', but still getting the same connection which one is configured during the report design. need a help to resolve this...
    Thanks,
    Ram

    eventhough it's working fine. I may have deployment problem. Anyway thanks for the reply.
    Regards,
    Ram

Maybe you are looking for