Expecting a cartesian join but did not get 1 (try to understand what is hap

Hello Oracle XML DB gurus,
I have successfully registered my schemas and inserted about 10,000 XML documents into the repository. Now I need to start reporting on the data that is in the documents. Following is a simplified form of my set-up.
I have a table that contain a XML_TYPE column that is schema based.
I will call the table TEST_REF it has two columns: ID number (PK) and XML_DOC which is of the foo schema.
foo schema has the following structure (foo is unbounded).
<DataSet>
<fooList>
<foo>
<val1></val1>
<val2></val2>
</foo>
<foo>
<val1></val1>
<val2></val2>
</foo>
</fooList>
</DataSet>
What I would like to do is select the XML document that I want to extract data from using the ID column. After that I wanted to be able to select all of the data values in /DataSet/fooList/foo from that document (val1 & val2).
I was able to do just that using the following query. However, I do not understand why the following query does not give me a cartesian product when I try to operate on mulitple documents. I'm actually getting exactly what I want, which are the individual data values from each document. I just need to understand what is going on. Does the table() function when used in this fashion perform a inner join for you? I hope this make sense.
select doc.id, extractvalue(Column_value,'/foo/val1') as VALUE1,
extractvalue(Column_value,'/foo/val2') as VALUE2
from test_ref doc,
table(XMLSequence(extract(doc.XML_DOC,'/DataSet/fooList/foo'))) foobar
where doc.id ='1'
------------------------ second where causes the I thought would cause a cartesian join--------------------
where doc.id in (1,2)
Sample data and results when using second where clause:
ID=1
<DataSet>
<fooList>
<foo>
<val1>2</val1>
<val2>22</val2>
</foo>
<foo>
<val1>4</val1>
<val2>44</val2>
</foo>
</fooList>
</DataSet>
ID=2
<DataSet>
<fooList>
<foo>
<val1>1</val1>
<val2>11</val2>
</foo>
<foo>
<val1>3</val1>
<val2>33</val2>
</foo>
</fooList>
</DataSet>
Results:
ID Value1 Value2
1 2 22
1 4 44
2 1 11
2 3 33
If what I'm asking does not make sense please let me know. I'm a newbe with this Oracle XML DB stuff. However, I really like what I have seen so far!
Thanks in advance
Derrick

It's a correlated join...

Similar Messages

  • Eula has stopped working; put path but did not get and "accept" option  now what?

    I cannot get Adobe Reader 11.0.02 to work and get the message "Eula is not working" .  I searched and performed the recommended path check ie.
    C:\ProgramFiles(x86)\Adobe\Reader11.0\Reader -- but got no option to "accept".
    Now what do I do?

    You double-clicked the Eula.exe ?

  • I installed Lion, but did not get the multi touch gestures feature. Also my "front row" is gone.

    I installed Lion, but did not get the multi touch gestures feature. Also my "front row" is gone.

    What model computer do you have? some early trackpads will not support all gestures.
    Front Row was dropped by Apple in Lion. I beleive it can be recovered from Snow Leopard, I haven't tried it myself.

  • I installed Mac OS 10.9.4, but did not get iLife and iWorks. How can I obtain these

    I installed Mac OS 10.9.4, but did not get iLife and iWorks. How can I obtain these? Somebody talked about redemption codes, but I did not find any extra information. Any suggestions?
    Thanks in advance and best regards

    If your computer shipped with Mac OS X 10.6.8 or earlier, install them from the computer's original disks.
    If your computer shipped with Mac OS X 10.7 or newer, log into the Mac App Store with the Apple ID used to register the computer, click on the Purchases tab, and download them.
    If neither of these is applicable, buy them from the Mac App Store.
    (109450)

  • Just downloaded book but did not get all the way down now cant play it  any answers

    just downloaded book but did not get all the way down now cant play it  any answers

    in iTunes, access your purchase history via your account in the iTunes store, find the file in question, and click on the report a problem button. report the problem. more info in this support article. 
    clicking here  should take you directly to your iTunes store log-in window.

  • I have a old firefox account and I cannot sign on too. I made new account just to ask a question. I tried to sign in with old emails, but did not get any reset information back. How can I recover old information?

    I have a old firefox account and I cannot sign on too. I made new account just to ask a question. I tried to sign in with old emails, but did not get any reset information back. How can I recover old information?

    Backing up and restoring your Profile should have included your bookmarks.
    https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    https://support.mozilla.org/en-US/kb/recovering-important-data-from-an-old-profile
    That looks like a JSON bookmarks backup file, from 11-01-2012. Did you try '''restoring''' that file?
    https://support.mozilla.org/en-US/kb/restore-bookmarks-from-backup-or-move-them#w_using-a-bookmark-backup-file
    Never messed with JSON files other than viewing them on a few occasions out of curiosity. There are no line breaks which make them very difficult to read.
    As far as working with that file in {like} NotePad goes:
    A. use Find / Search for each indecent of a '''"uri"''' string, then "copy and paste" the uri into another text file, and then move on to the next "uri" string.
    B. use a text program where a filter can be set for the "uri" field in the JSON file for a line break or to "scrape out" the "uri"s only for display or export to a list of uri's.
    Or try using an online JSON editor like this, to try to display only the "uri" field.
    https://www.jsoneditoronline.org/

  • I have a MacBook Pro and would like to play VCD, which is not a supported disc. I opend the Quicktime and it showed up in the Dock but did not get a menu. Would appreciate any help.

    I have a MacBook Pro and would like to play VCD, which is not a supported disc. I opend the Quicktime and it showed up in the Dock but did not get a menu. Would appreciate any help.

    Download a program called VLC.
    http://www.videolan.org/vlc/download-macosx.html

  • I installed CS5 but did not get an icon on my desktop

    I instaled Photoshp CS5 but did not get and idcon on my desk top.  How do I accomplish that?

    windows: right click the exe > click "send to > "desktop (as shortcut)" 
    mac: right click the exe > click "create alias" > drag the alias to your desktop.

  • I just downloaded iOS 8 but did not get the health app on my iPad

    I Thought that I get health app when I download iOS 8 on my iPad but did not happen to get one

    Health is available on iPhone 4s or later and iPod touch (5th generation).
    From this site: https://www.apple.com/ios/whats-new/health/

  • When i updated my ipod to ios 6 but i did not get siri or the phone.what should i do?

    when i updated my ipod to ios 6 i did not get siri or the phone and i really wanted it.what should i do?

    I'm sorry to say that Siri will work only on 5th generation iPods.

  • Signed up for autopay but did not get my extra 500MB of data ?

    Well, I have two phones on the $45/1GB data plan and signed up for autopay. Supposed to get 500MB of data if you do that, but I did not. Who do I call ?

    I would call  customer service.

  • I have successfully downloaded Photoshop Elements but did not get an e-mail and do not have a registration # and need help getting one/

    I have successfully downloaded Photoshop Elements 13.  I did not receive an e-mail with the registration number but did get verification of email address.  I have been through all the help sights and only reach dead ends.  Help!

    Photoshop Elements is not part of the Cloud, I will move this to that forum
    Photoshop Elements Forum http://forums.adobe.com/community/photoshop_elements
    Select a topic, then click I STILL NEED HELP to activate Photoshop Elements Online chat
    -http://helpx.adobe.com/contact.html?product=photoshop-elements or
    http://helpx.adobe.com/photoshop-elements/kb/troubleshoot-installation-photoshop-elements- premiere.html

  • My wife's iTunes ID will no longer work.  Tried to reset password but did not get email, tried to reset by answering personal questions' but will not accept the correct date of birth.  Has it been hacked?  How can I fix this?

    My wife's iTunes used ID will not work.  Tried resetting the password, but email was not received.  Tried using personal questions method, but would not accept the correct date of birth, so could not go any further.  Has her iTunes ID been hacked?  How can I fix this?

    Thanks for that advice @randers4.
    I linked through and submitted my info as a "topic not covered" in the iCloud section. After entering the serial number of my MBP it turns out I wasn't eligible for technical support (though I don't think this is hardware related support) and the final suggestion was to take my computer into an Apple store. I called my local Apple reseller and asked for assistance. The customer service rep was very nice but unable to help, so suggested I call Apple Support on 1300 321 456. I did so and, again, spoke to two very polite and helpful customer service people (I was transferred to security services). I didn't have to be on hold to speak to either rep for more than a few seconds! After trying a few different things, he worked out what was happening...
    So, to cut a long story short, to solve the problem in my OP, all I had to do was log out of iCloud in my System Preferences and log back in using my current Apple ID. [Edited to add that I had to sign out of everything I was currently signed in to with my Apple ID before logging out and in again.]
    Problem solved!
    Message was edited by: NotBaconBits

  • I bought a song but did not get it! it said i downloaded but did not get it

    i bought a song but it did not download on my account!

    Howdy Julie,
    Try clicking iTunes, Store, Check for Available Downloads.
    If its not there don't worry, iCloud will let you redownload the song. Just click the Purchased link on the right side of the iTunes Store, Music, click All Songs, then the iCloud download icon to redownload the song.
    And, if its not showing up in Available Downloads or Purchases, the purchase didn't go through (at least not with that iTunes account).
    WTH.

  • I tried to down load mountain lion. was charged for the down load but did not get the down load

    I coukd not get the mountain lion to down load on my computer.

    Ok, we will get through this. But you need to give us a description of what exactly the problem is.

Maybe you are looking for

  • Transferring music problem (horrible situation please help!!)

    Hey yesterday was my 21st Bday my 2 sisters and one of their bf's got me the new ipod. My sisters bf has preloaded the ipod with 30gigs of music as a gift also (using his laptop) HOWEVER the problem is....uv guessed it....Does this mean i cant put my

  • Starting up in Safe Mode

    I am trying to start up in Safe Mode and I know that I have to hold shift after I hear the "on" sound after turning the computer on from shut down. But I don't hear any on sound... What do I do?

  • Bh-803 and connection to 8800 Sapphire

    Hello guys, Yesterday, a customer camed to me asking if I can connect his standard BH-803 bluetooth handsfree to his 8800 Saph. phone, telling me that he tried and tried after the manuals but nothing... I took the operations in my hands... The blueto

  • Import Assistant not working.

    Hi. I'm using JDeveloper 9.0.5.2 and I can not get the Import Assistance feature to work. Suppose I type in the following: public class CC URL u; The text "URL" is indeed underlined, showing me that I have a problem but no Import Assitance drop-down

  • DRM = obstacle à la lecture sur iPad

    Bonjour, J'ai téléchargé des livres au format .acsm que je peux lire sur mon iMac avec ADE. Je ne parviens pas à les transférer sur mon iPad (livres achetés chez deux éditeurs différents) Ce que j'ai essayé : 1) Installer BlueFire sur l'iPad (iOS 7)