How can I generate STREET ADDRESS element as opposed to STREET_ADDRESS

Hi,
The 2nd query below generates XML like <STREET_ADDRESS>2014 Jabberwocky Rd</STREET_ADDRESS>.
I'd rather see <STREET ADDRESS>2014 Jabberwocky Rd</STREET ADDRESS> [without '_'] so I revised the original query to the 1st query below, then problem started happening.
Why can't I use "...return <STREET ADDRESS> {$j/STREET_ADDRESS} </STREET ADDRESS>..." This makes a logical sense to me. But Xquery obviously has problem with this kind of syntax!
Does anyone know how to get around this?
Sun
------------- 2 Queries -----------------------
SQL> SELECT XMLQuery(
2 'for $i in ora:view("OE", "WAREHOUSES")/ROW
3 return <Warehouse id="{$i/WAREHOUSE_ID}">
4 <Location>
5 {for $j in ora:view("HR", "LOCATIONS")/ROW
  6      where $j/LOCATION_ID eq $i/LOCATION_ID
  7      return <STREET ADDRESS> {$j/STREET_ADDRESS} </STREET ADDRESS>
8 }
9 </Location>
10 </Warehouse>'
11 RETURNING CONTENT) FROM DUAL;
RETURNING CONTENT) FROM DUAL
ERROR at line 11:
ORA-19114: error during parsing the XQuery expression:
oracle.xquery.XQException: Parsing failed 'Encountered ">" at line 6, column
32.
Was expecting one of:
<S> ...
"=" ...
SQL> SELECT XMLQuery(
2 'for $i in ora:view("OE", "WAREHOUSES")/ROW
3 return <Warehouse id="{$i/WAREHOUSE_ID}">
4 <Location>
5 {for $j in ora:view("HR", "LOCATIONS")/ROW
  6      where $j/LOCATION_ID eq $i/LOCATION_ID
  7      return ($j/STREET_ADDRESS)
  8           }
9 </Location>
10 </Warehouse>'
11 RETURNING CONTENT) FROM DUAL;
XMLQUERY('FOR$IINORA:VIEW("OE","WAREHOUSES")/ROWRETURN<WAREHOUSEID="{$I/WAREHOUS
<Warehouse id="1"><Location><STREET_ADDRESS>2014 Jabberwocky Rd</STREET_ADDRESS>
SQL>
Message was edited by:
user522531

Sorry about the format in the body of the message:
I include the source code for 2 queries:
1st Query ( * this one has a problem!):
SELECT XMLQuery(
'for $i in ora:view("OE", "WAREHOUSES")/ROW
return <Warehouse id="{$i/WAREHOUSE_ID}">
     <Location>
     {for $j in ora:view("HR", "LOCATIONS")/ROW
      where $j/LOCATION_ID eq $i/LOCATION_ID
      return <STREET ADDRESS> {$j/STREET_ADDRESS} </STREET ADDRESS>
     </Location>
</Warehouse>'
RETURNING CONTENT) FROM DUAL;
2nd Query:( This one is OK)
SELECT XMLQuery(
'for $i in ora:view("OE", "WAREHOUSES")/ROW
return <Warehouse id="{$i/WAREHOUSE_ID}">
     <Location>
     {for $j in ora:view("HR", "LOCATIONS")/ROW
      where $j/LOCATION_ID eq $i/LOCATION_ID
      return ($j/STREET_ADDRESS)
     </Location>
</Warehouse>'
RETURNING CONTENT) FROM DUAL;

Similar Messages

  • How can i get vendor address

    how can i get vendor address from lfa1 table.
    plz help me

    data: begin of itab occurs 0,
          adrnr like lfa1-adrnr,
          ADDRNUMBER like adrc-ADDRNUMBER,
          name1 like adrc-name1,
          name2 like adrc-name2,
          house_num1 like adrc-house_num1,
          street like adrc-street,
          city1 like adrc-city1,
          end of itab.
    select yadrnr xADDRNUMBER xname1 xname2 xhouse_num1 xstreet
    xcity1 from adrc as x inner join lfa1 as y on xADDRNUMBER = y~adrnr
    into table itab.

  • How can i generate xml like this?

    Hi all,
    How can i generate xml like this & i need to send it to via HTTP :
    <mms>
                 <subject>message subject</subject>
                 <url_image>http://image_url</url_image>
                 <url_sound>http://sound_url</url_sound>
                 <url_video>http://video_url</url_video>
                 <text>message text</text>
                 <msisdn_sender>6281XYYYYYY</msisdn_sender>
                 <msisdn_receipient>6281XYYYYYY</msisdn_receipient>
                 <sid>to be define later</sid>
                 <trx_id>Unique number</trx_id>
                 <trx_date>yyyyMMddHHmmss</trx_date>
                 <contentid>see note</contentid>
    </mms>& how can i get the value of the sid (for example)?
    I hav tried to generate that xml by using StringBuffer & append, but it's not what i mean...
    Anyone can help me?

    Ok...i got it. But i still hav some problems.
    This is the sample code that i used :
    public class XMLCreator {
         //No generics
         List myData;
         Document dom;
            Element rootEle, mmsEle, mmsE;
            StringWriter stringOut;
            mms mms;
         public XMLCreator(String subject, String image, String sound,
                    String video, String text, String sender, String recipient,
                    int id, String date, String contentid) {
              mms = new mms(subject, image, sound, video, text, sender,
                            recipient, id, contentid, date);
                    createDocument();
         public void run(){
              createDOMTree();
              print();
         private void createDocument() {
              //get an instance of factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              try {
              //get an instance of builder
              DocumentBuilder db = dbf.newDocumentBuilder();
              //create an instance of DOM
              dom = db.newDocument();
              }catch(ParserConfigurationException pce) {
                   //dump it
                   System.out.println("Error while trying to instantiate DocumentBuilder " + pce);
         private void createDOMTree(){
              //create the root element <Mms>
              rootEle = dom.createElement("mms");
              dom.appendChild(rootEle);
              createMmsElement(mms);
         private Element createMmsElement(mms b){
              Element subjectEle = dom.createElement("subject");
              Text subjectText = dom.createTextNode(b.getSubject());
              subjectEle.appendChild(subjectText);
              rootEle.appendChild(subjectEle);
              //create url_image element and author text node and attach it to mmsElement
              Element imageEle = dom.createElement("url_image");
              Text imageText = dom.createTextNode(b.getUrl_image());
              imageEle.appendChild(imageText);
              rootEle.appendChild(imageEle);
              // & etc....
              return rootEle;
          * This method uses Xerces specific classes
          * prints the XML document to file.
         private void print(){
              try
                   //print
                   OutputFormat format = new OutputFormat(dom);
                   format.setIndenting(true);
                            stringOut = new StringWriter();
                   //to generate output to console use this serializer
                   XMLSerializer serializer = new XMLSerializer(stringOut, format);
                   //to generate a file output use fileoutputstream instead of system.out
                   //XMLSerializer serializer = new XMLSerializer(
                   //new FileOutputStream(new File("mms.xml")), format);
                   serializer.serialize(dom);
              } catch(IOException ie) {
                  ie.printStackTrace();
            public String getStringOut() {
                return stringOut.toString();
    }when i tried to show the stringOut.toString() in my jsp, it's only showed string like this :
    The Lords Of The Ring http://localhost:8084/movie/lotr.3gp 6281321488448 6281321488448 123 0 20070220114851 LOTR.
    1. Why this is happen?i want to generate xml which its format is like above.
    2. How can i send this xml (put in msg parameter) using jsp (via web) without creating the mms.xml?
    3. if i want to set the msg parameter equal to mms.xml - means that msg = mms.xml, what is the data type for msg? is it an object or anything else?
    Thx b4 in advance...

  • My ipad recognizes my home network but will not connect to the internet. When I click on AirPort/preferences at the top of the imac screen it says..."AirPort has a self-assigned ip address and may not connect to the internet".How can I change ip address?

    My ipad recognizes my home network but will not connect to the internet. When I click on AirPort/preferences at the top of the imac screen it says..."AirPort has a self-assigned ip address and may not connect to the internet". If this is the root of the problem,how can I change ip address?
    Ipad will connect no problem to other networks.

    First thing you need I think is to get your iMac connected to the Internet.
    Shut down your iMac and you iPad. Then power off your router. Wait 30 seconds and power up the router.
    After the router indicates that it is connected to the Internet then start up your iMac and see if it connects. If the iMac connects to the Internet then your iPad should too.
    If this power up sequence doesn't work you'll have to dig into the router setup to make sure it is working properly.

  • How can I Generate two different reports from single execution of Test cases in NI teststand

    Hi,
    My requirement is to generate two different reports from NI teststand. One for the Logging of error descriptions and the other report is by default generated by the Teststand. How can i generate a txt file that contains error descriptions other than that mentioned in the default report?
    Solved!
    Go to Solution.

    Do you need to do that just for these two sequences but not for other sequences? I don't see a problem to use SequenceFilePostStepRuntimeError. Create this callback in both sequence files and configure them to log into the same file. SequenceFilePostStepRuntimeError callback is called after each step of the sequence file if it has runtime error. You can access the calling step error information via RunState.Caller.Step.Result.Error property. Take a look to attached example.
    The "other way" is useful if you need to log errors not for every step of the sequence file, but for some of them. This is more complex, because you need to create a custom step types for these steps. For the custom step you can create substeps (post-step in your case) which will be executed every time after step of this type executed. Then, this is you job to determine if error happened in the step, acces to step's error information is via Step.Result.Error property. 
    Also, be aware that step's post-expression is not executed in case of error in the step.
    Sergey Kolbunov
    CLA, CTD
    Attachments:
    SequenceFilePostStepRuntimeError_Demo.seq ‏7 KB

  • How can I have 2 address books?

    Am new to Mac after microsoft. How can I have 2 address books, can it be done without opening another account?
    thanks.

    not sure if anyone found a solution to this but I found one at this link.
    http://bugzilla.zimbra.com/show_bug.cgi?id=33227
    I wiped my device to fix my problem before I found this, but it seems like this may solve this issue.
    this is comment 11 from the link provided.
    (In reply to comment #10)
    > It's not "fixed" for my users who have five instances of addresses on their BB.
    >  Is there a way to delete the redundant address stores from their devices
    > without wiping and reactivating?
    > thanks
    > Kevin
    While in the Address Book press the Menu and than Options. Just type in RSET
    (capital letters) and you'll be able to wipe out all your Desktops where the
    Wireless synchronization is Not available. You can keep intact the last Desktop
    where the Wireless Synchronization is Yes.
    Rasim Duric

  • My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    I use my iPad to get the address book backed up by iCloud from my iPhone. However, I cannot see the recent new contacts from my iPad. Is there anyway to check the iCloud server to see if my address book backup from my iPhone is still there?

  • How can I generate SSL Keys from a Oracle 9iAS server version 1.0.2.2.0

    How can I generate SSL Keys for use on Oracle 9iAS server
    version 1.0.2.2.0. I have tried using the open_ssl method but
    was unsuccessful.

    <?xml version="1.0" encoding="UTF-8" ?>
    <nodes>
    <node>
    <category_id>3</category_id>
    <parent_id>2</parent_id>
    <name>Mobile</name>
    <is_active>1</is_active>
    <position>1</position>
    <level>2</level>
    <children>
    <node name="Nokia" category_id="6" parent_id="3" is_active="1" position="1" level="3">
    <node name="Nokia N79" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N95" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N97" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    </node>
    <node name="Samsung" category_id="7" parent_id="3" is_active="1" position="2" level="3">
    </node>
    </children>
    </node>
    <node>
    <category_id>4</category_id>
    <parent_id>2</parent_id>
    <name>Laptop</name>
    <is_active>1</is_active>
    <position>2</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>5</category_id>
    <parent_id>2</parent_id>
    <name>Monitor</name>
    <is_active>1</is_active>
    <position>3</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>8</category_id>
    <parent_id>2</parent_id>
    <name>Camera</name>
    <is_active>1</is_active>
    <position>4</position>
    <level>2</level>
    <children></children>
    </node>
    </nodes>
    Is this correct format to create dynamic menu?

  • How can I get the address book to sort by "Last" name (using v 31.3.0).

    After a computer crash, I had to load Thunderbird (v31.3.0) back into my machine running Windows 8.1, and I successfully imported my address book back up file into Thunderbird (v31.3.0).
    My problem is that I don't see an option to sort the address book by "Last" name, which was available with the version of Thunderbird I had before the crash.
    How can I get the address book to sort by "Last" name?

    In 'Address Book'
    Select address book
    'View' > 'Show name as' > 'Last/First'
    The you can sort by Name.
    Either click on 'Name' column header to change sort order,
    If reversed, then click on 'Name' column header again to reverse the order.
    Or
    'View' > 'Sort By' > choose 'Name' and 'Ascending'

  • How can I access the selected element of a DropDownByIndex-box?

    Hi,
    I want to create a WebDynpro with two web services. I created the first request with the first web service and the results are displayed in a DropDownByIndex-Box. Now the user should choose one of the results and I would like to use this for the request with my second web service. How can I access the selected Element of a DropDownByIndexBox in the Code?
    Thank you!!
    Julia

    Hi Julia,
    when user select one element in drop down it automatically set lead selection of node binded to dropdown.
    For example if you bind a dropdown to node myNode with value attribute myAttribute the lead selection of node myNode is set in the position of element choose from user.
    So to take this chooised element use this code:
    wdContext.currentMyNodeElement.getmyAttribute()
    bye
    Andrea

  • How can I move my Premiere elements 8 from my old pc to my new imac?

    How can I move my Premiere elements 8 from my old pc to my new imac?

    tenfootprints
    Does your imac come with a Windows Mac interface?
    If not, you cannot. There is no Premiere Elements 8 Mac version. And, you cannot install Premiere Elements 8 Windows on
    a Mac computer. As I recall, Premiere Elements 9.0/9.0.1 was the first Premiere Elements version to be offered in Windows and Mac versions.
    Please explain with more details.
    Thanks.
    ATR

  • I upgraded my computer to 64bit.  How can I transfer my Premiere Elements 8.0 (32bit) to new computer?

    In October 2014, I purchased Adobe Premier Elements 8.0 (and the APE Templates 8.0) for my work computer (32bit Windows 7).  Now they gave me a new computer which is 64bit (Windows 7).  How can I get my Premier Elements program back on my new computer without having to purchase it all over again?  I only had the program for a couple of months before they upgraded my computer  to a 64bit  I submitted my question through "Adobe Chat" and they said they couldn't help and I would need to check the forums.  Thanks to anyone who can help!   Jay
    [Moved from Premiere PRO forum to Premiere Elements... Mod]

    jaym
    What did you have for installation...
    a. installation files from a purchased download from Adobe
    or
    b. installation disc from boxed packaging of the product?
    If you have an installation disc, then insert the disc into the burner tray and follow the instructions for the installation
    that present sequentially. Remember that Premiere Elements 8 on Windows 7 64 bit is still going to be a 32 bit application.
    It will be running in the 32 bit compatibility mode of the 64 bit computer and the 32 bit limitations would apply. But Premiere Elements
    8 will install on Windows 7, 8, or 8.1 64 bit but not as a 64 bit application.
    Now if you purchased an download, those downloads are typically specific to the operating system to which it was downloaded.
    Whether or not installation files downloaded to a 32 bit computer will work on 64 bit computer is questionable. Best advice is to
    try it. You will get an immediate message from the computer and program if it is a no go.
    Please review and let us know the outcome.
    Any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR
    Add On...Premiere Elements Windows is a 64 bit application only when it is version 10, 11, 12, or 13 run specifically on
    Windows 7, 8, or 8.1 64 bit computer.

  • How can I sync the address book from Mail to my Address book?

    Ok, I open a new message and click on the Address Book icon in the new message to find my contacts on the address book, I choose the group I am looking for and the group has people on it that I have already deleted from my address book! How can I sync the address book from Mail to my Address book?

    It is using the same database on disk. You may have to re-launch Mail.

  • How can we generate the reports in html or text file formats?

    Hi,
    Is there any package that can help in creating HTMLDB reports in .txt files or .html files? (Similar to TEXT_IO in Oracle Forms)
    How can we generate the reports in html or text file formats from HTMLDB?
    Thanks in Advance
    Renjith

    Hello all.
    Bi Publisher is great, but has a very high price tag. It's even more expensive than Forms & Reports Services. We are considering APEX to replace Forms & Reports on the web, but the reporting limitations are still a problem.
    I wonder if there is another option.
    Thanks

  • How can we generate the report of backup,tablesapcefrom OEM / RMAN

    How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
    1.)we need generate the report of tablespace used,free, archive...
    2.)How can we generate the Backup status report also

    user13584223 wrote:
    How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
    1.)we need generate the report of tablespace used,free, archive...There are DBA_* views that expose the necessary information. They are documented in the Reference Manual.
    2.)How can we generate the Backup status report alsoThere are rman commands that give that. They are documented in the Backup and Recovery User's Guide.
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to [url tahiti.oracle.com]tahiti.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

Maybe you are looking for